Example usage for org.apache.lucene.analysis.th ThaiTokenizer ThaiTokenizer

List of usage examples for org.apache.lucene.analysis.th ThaiTokenizer ThaiTokenizer

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.th ThaiTokenizer ThaiTokenizer.

Prototype

public ThaiTokenizer() 

Source Link

Document

Creates a new ThaiTokenizer

Usage

From source file:org.carrot2.text.linguistic.lucene.ThaiTokenizerAdapter.java

License:Open Source License

public void reset(Reader input) throws IOException {
    assert input != null;
    try {/*from   w w  w .ja  v a 2  s  .  c om*/
        this.tokenizer = new ThaiTokenizer();
        tokenizer.setReader(input);

        this.term = tokenizer.addAttribute(CharTermAttribute.class);
        this.tokenizer.reset();
    } catch (Exception e) {
        throw ExceptionUtils.wrapAsRuntimeException(e);
    }
}

From source file:org.elasticsearch.analysis.common.ThaiTokenizerFactory.java

License:Apache License

@Override
public Tokenizer create() {
    return new ThaiTokenizer();
}