Example usage for org.apache.lucene.analysis.hi HindiAnalyzer getDefaultStopSet

List of usage examples for org.apache.lucene.analysis.hi HindiAnalyzer getDefaultStopSet

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.hi HindiAnalyzer getDefaultStopSet.

Prototype

public static CharArraySet getDefaultStopSet() 

Source Link

Document

Returns an unmodifiable instance of the default stop-words set.

Usage

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

License:Apache License

HindiAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new HindiAnalyzer(Analysis.parseStopWords(env, settings, HindiAnalyzer.getDefaultStopSet()),
            Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET));
    analyzer.setVersion(version);/*from  w w  w  .j  av a  2  s.  c o  m*/
}

From source file:org.elasticsearch.index.analysis.HindiAnalyzerProvider.java

License:Apache License

@Inject
public HindiAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, Environment env,
        @Assisted String name, @Assisted Settings settings) {
    super(index, indexSettings, name, settings);
    analyzer = new HindiAnalyzer(version,
            Analysis.parseStopWords(env, settings, HindiAnalyzer.getDefaultStopSet(), version),
            Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET, version));
}

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

License:Open Source License

@Override
protected TokenStream getTokenStream(final String strOrig, final boolean stemsAllowed,
        final boolean stopWordsAllowed) {
    if (stemsAllowed) {
        Set<?> stopWords = stopWordsAllowed ? HindiAnalyzer.getDefaultStopSet() : Collections.EMPTY_SET;
        return new HindiAnalyzer(getBehavior(), stopWords).tokenStream("", new StringReader(strOrig));
    } else {//from w  w  w.  j  a  v a2  s. c  o  m
        return new StandardTokenizer(getBehavior(), new StringReader(strOrig));
    }
}