Example usage for org.apache.lucene.analysis.el GreekAnalyzer tokenStream

List of usage examples for org.apache.lucene.analysis.el GreekAnalyzer tokenStream

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.el GreekAnalyzer tokenStream.

Prototype

public final TokenStream tokenStream(final String fieldName, final Reader reader) 

Source Link

Document

Returns a TokenStream suitable for fieldName, tokenizing the contents of reader.

Usage

From source file:org.omegat.tokenizer.LuceneGreekTokenizer.java

License:Open Source License

@Override
protected TokenStream getTokenStream(final String strOrig, final boolean stemsAllowed,
        final boolean stopWordsAllowed) {
    if (stemsAllowed) {
        GreekAnalyzer an;
        if (stopWordsAllowed) {
            an = new GreekAnalyzer(getBehavior());
        } else {//from ww  w.  j  av a2s  . c o  m
            an = new GreekAnalyzer(getBehavior(), EMPTY_STRING_LIST);
        }
        return an.tokenStream("", new StringReader(strOrig));
    } else {
        return new StandardTokenizer(getBehavior(), new StringReader(strOrig));
    }
}