切词器记录

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编辑  收藏  举报

导航