Class MorfologikAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.morfologik.MorfologikAnalyzer
- All Implemented Interfaces:
Closeable,AutoCloseable
Analyzer using Morfologik library.- Since:
- 4.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer
Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents -
Field Summary
Fields inherited from class org.apache.lucene.analysis.Analyzer
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY -
Constructor Summary
ConstructorsConstructorDescriptionBuilds an analyzer with the default Morfologik's Polish dictionary.MorfologikAnalyzer(morfologik.stemming.Dictionary dictionary) Builds an analyzer with an explicitDictionaryresource. -
Method Summary
Modifier and TypeMethodDescriptionprotected Analyzer.TokenStreamComponentscreateComponents(String field) Creates aAnalyzer.TokenStreamComponentswhich tokenizes all the text in the providedReader.Methods inherited from class org.apache.lucene.analysis.Analyzer
attributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, initReader, initReaderForNormalization, normalize, normalize, tokenStream, tokenStream
-
Constructor Details
-
MorfologikAnalyzer
public MorfologikAnalyzer(morfologik.stemming.Dictionary dictionary) Builds an analyzer with an explicitDictionaryresource.- Parameters:
dictionary- A prebuilt automaton with inflected and base word forms.- See Also:
-
MorfologikAnalyzer
public MorfologikAnalyzer()Builds an analyzer with the default Morfologik's Polish dictionary.
-
-
Method Details
-
createComponents
Creates aAnalyzer.TokenStreamComponentswhich tokenizes all the text in the providedReader.- Specified by:
createComponentsin classAnalyzer- Parameters:
field- ignored field name- Returns:
- A
Analyzer.TokenStreamComponentsbuilt from anStandardTokenizerfiltered withMorfologikFilter.
-