Class MorfologikAnalyzer

java.lang.Object
org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.morfologik.MorfologikAnalyzer
All Implemented Interfaces:
Closeable, AutoCloseable

public class MorfologikAnalyzer extends org.apache.lucene.analysis.Analyzer
Analyzer using Morfologik library.
Since:
4.0.0
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer

    org.apache.lucene.analysis.Analyzer.ReuseStrategy, org.apache.lucene.analysis.Analyzer.TokenStreamComponents
  • Field Summary

    Fields inherited from class org.apache.lucene.analysis.Analyzer

    GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Builds an analyzer with the default Morfologik's Polish dictionary.
    MorfologikAnalyzer(morfologik.stemming.Dictionary dictionary)
    Builds an analyzer with an explicit Dictionary resource.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents
    Creates a Analyzer.TokenStreamComponents which tokenizes all the text in the provided Reader.

    Methods inherited from class org.apache.lucene.analysis.Analyzer

    attributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, initReader, initReaderForNormalization, normalize, normalize, tokenStream, tokenStream

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MorfologikAnalyzer

      public MorfologikAnalyzer(morfologik.stemming.Dictionary dictionary)
      Builds an analyzer with an explicit Dictionary resource.
      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

      protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String field)
      Creates a Analyzer.TokenStreamComponents which tokenizes all the text in the provided Reader.
      Specified by:
      createComponents in class org.apache.lucene.analysis.Analyzer
      Parameters:
      field - ignored field name
      Returns:
      A Analyzer.TokenStreamComponents built from an StandardTokenizer filtered with MorfologikFilter.