切词器记录
StringReader str =new StringReader("abcdefg");
Tokenizer tokenizer = new NGramTokenizer(Version.LUCENE_48, str, 3, 10);
term=abc
term=abcd
term=abcde
term=abcdef
term=abcdefg
term=bcd
term=bcde
term=bcdef
term=bcdefg
term=cde
term=cdef
term=cdefg
term=def
term=defg
term=efg
Tokenizer tokenizer=new EdgeNGramTokenizer(Version.LUCENE_48, str, 3, 10);
term=abc
term=abcd
term=abcde
term=abcdef
term=abcdefg
一步一个脚印,方便自己复习,欢迎大家指正,非常感谢,共同进步!
posted on 2016-08-16 16:37 lovebeauty 阅读(223) 评论(0) 编辑 收藏 举报