Example usage for org.apache.lucene.analysis.gl GalicianAnalyzer getDefaultStopSet

List of usage examples for org.apache.lucene.analysis.gl GalicianAnalyzer getDefaultStopSet

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.gl GalicianAnalyzer 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.GalicianAnalyzerProvider.java

License:Apache License

GalicianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
    super(indexSettings, name, settings);
    analyzer = new GalicianAnalyzer(
            Analysis.parseStopWords(env, settings, GalicianAnalyzer.getDefaultStopSet()),
            Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET));
    analyzer.setVersion(version);/* w w  w . ja v a2s  .c o m*/
}

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

License:Apache License

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

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

License:Open Source License

@Override
protected TokenStream getTokenStream(final String strOrig, final boolean stemsAllowed,
        final boolean stopWordsAllowed) {
    if (stemsAllowed) {
        Set<?> stopWords = stopWordsAllowed ? GalicianAnalyzer.getDefaultStopSet() : Collections.EMPTY_SET;
        return new GalicianAnalyzer(getBehavior(), stopWords).tokenStream("", new StringReader(strOrig));
    } else {//from w  ww  .j  av a2s .  co m
        return new StandardTokenizer(getBehavior(), new StringReader(strOrig));
    }
}