KoreanAnalyzer (Lucene 10.5.1 nori API)
Description: declaration: package: org.apache.lucene.analysis.ko, class: KoreanAnalyzer

Package org.apache.lucene.analysis.ko

# Class KoreanAnalyzer

java.lang.Object
org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.ko.KoreanAnalyzer

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public class KoreanAnalyzer extends Analyzer
Analyzer for Korean that uses morphological analysis.

Since:
  7.4.0
See Also:
  - `KoreanTokenizer`
WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## 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

  Constructors
  Constructor
  Description
  `KoreanAnalyzer()`
  Creates a new KoreanAnalyzer.
  `KoreanAnalyzer(UserDictionary userDict, KoreanTokenizer.DecompoundMode mode, Set<POS.Tag> stopTags, boolean outputUnknownUnigrams)`
  Creates a new KoreanAnalyzer.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Analyzer.TokenStreamComponents`
  `createComponents(String fieldName)`
  `protected TokenStream`
  `normalize(String fieldName, TokenStream in)`

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

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

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### KoreanAnalyzer

    public KoreanAnalyzer()
    Creates a new KoreanAnalyzer.

  - ### KoreanAnalyzer

    public KoreanAnalyzer(UserDictionary userDict, KoreanTokenizer.DecompoundMode mode, Set<POS.Tag> stopTags, boolean outputUnknownUnigrams)
    Creates a new KoreanAnalyzer.
    Parameters:
      `userDict` - Optional: if non-null, user dictionary.
      `mode` - Decompound mode.
      `stopTags` - The set of part of speech that should be filtered.
      `outputUnknownUnigrams` - If true outputs unigrams for unknown words.

- ## Method Details

  - ### createComponents

    protected Analyzer.TokenStreamComponents createComponents(String fieldName)
    Specified by:
      `createComponents` in class `Analyzer`

  - ### normalize

    protected TokenStream normalize(String fieldName, TokenStream in)
    Overrides:
      `normalize` in class `Analyzer`