Java 类org.apache.lucene.analysis.morfologik.MorfologikFilter 实例源码

项目:elasticsearch-ukrainian-lemmatizer    文件:UkrainianIndicesAnalysis.java   
@Inject
public UkrainianIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) {
    super(settings);

    final String ANALYZER_KEY = "ukrainian";
    final String FILTER_KEY = "ukrainian_lemmatizer";

    indicesAnalysisService.analyzerProviderFactories().put(
            ANALYZER_KEY,
            new PreBuiltAnalyzerProviderFactory(
                    ANALYZER_KEY,
                    AnalyzerScope.INDICES,
                    new UkrainianAnalyzer(Lucene.VERSION)));

    indicesAnalysisService.tokenFilterFactories().put(
            FILTER_KEY,
            new PreBuiltTokenFilterFactoryFactory(new TokenFilterFactory() {
                @Override
                public String name() {
                    return FILTER_KEY;
                }

                @Override
                public TokenStream create(TokenStream tokenStream) {
                    return new MorfologikFilter(tokenStream, UkrainianLemmatizerResources.getDictionary());
                }
            }));
}
项目:elasticsearch-analysis-morfologik    文件:MorfologikTokenFilterFactory.java   
@Override
public TokenStream create(TokenStream tokenStream) {
    return new MorfologikFilter(tokenStream);
}
项目:elasticsearch-ukrainian-lemmatizer    文件:UkrainianLemmatizerTokenFilterFactory.java   
@Override
public TokenStream create(TokenStream tokenStream) {
    return new MorfologikFilter(tokenStream, UkrainianLemmatizerResources.getDictionary());
}
项目:NYBC    文件:MorfologikFilterFactory.java   
/**
 * {@inheritDoc}
 */
@Override
public TokenStream create(TokenStream ts) {
  return new MorfologikFilter(ts, dictionary, luceneMatchVersion);
}