Package org.wltea.analyzer.lucene

Examples of org.wltea.analyzer.lucene.IKTokenizer.incrementToken()


 
  public void testLucene3Tokenizer(){
    String t = "IK分词器Lucene Analyzer接口实现类 民生银行";
    IKTokenizer tokenizer = new IKTokenizer(new StringReader(t) , false);
    try {
      while(tokenizer.incrementToken()){
        TermAttribute termAtt = tokenizer.getAttribute(TermAttribute.class);
        System.out.println(termAtt);       
      }
    } catch (IOException e) {
      // TODO Auto-generated catch block
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.