Package org.wltea.analyzer.lucene

Examples of org.wltea.analyzer.lucene.IKTokenizer


  /*
   * (non-Javadoc)
   * @see org.apache.solr.analysis.TokenizerFactory#create(java.io.Reader)
   */
  public Tokenizer create(Reader reader) {
    return new IKTokenizer(reader , isMaxWordLength());
  }
View Full Code Here


*/
public class IKTokenerTest extends TestCase {
 
  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
      e.printStackTrace();
View Full Code Here

    Dictionary.initial(new Configuration(env));
  }

  @Override
  public Tokenizer create(Reader reader) {
    return new IKTokenizer(reader, settings, environment);
  }
View Full Code Here

TOP

Related Classes of org.wltea.analyzer.lucene.IKTokenizer

Copyright © 2018 www.massapicom. 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.