org.apache.lucene.analysis.ko

## Class KoreanTokenizerFactory

- java.lang.Object
- - org.apache.lucene.analysis.util.AbstractAnalysisFactory
  - - org.apache.lucene.analysis.util.TokenizerFactory
    - - org.apache.lucene.analysis.ko.KoreanTokenizerFactory

- All Implemented Interfaces:
    ResourceLoaderAware

      public class KoreanTokenizerFactory
      extends TokenizerFactory
      implements ResourceLoaderAware

  Factory for `KoreanTokenizer`.

       <fieldType name="text_ko" class="solr.TextField">
         <analyzer>
           <tokenizer class="solr.KoreanTokenizerFactory"
                      decompoundMode="discard"
                      userDictionary="user.txt"
                      userDictionaryEncoding="UTF-8"
                      outputUnknownUnigrams="false"
           />
        </analyzer>
       </fieldType>

  Supports the following attributes:

  - userDictionary: User dictionary path.
  - userDictionaryEncoding: User dictionary encoding.
  - decompoundMode: Decompound mode. Either 'none', 'discard', 'mixed'. Default is discard. See `KoreanTokenizer.DecompoundMode`
  - outputUnknownUnigrams: If true outputs unigrams for unknown words.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory

      `LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KoreanTokenizerFactory(Map<String,String> args)` Creates a new KoreanTokenizerFactory

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `KoreanTokenizer` | `create(AttributeFactory factory)`
    `void` | `inform(ResourceLoader loader)`

    - ### Methods inherited from class org.apache.lucene.analysis.util.TokenizerFactory

      `availableTokenizers, create, forName, lookupClass, reloadTokenizers`

    - ### Methods inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory

      `get, get, get, get, get, getBoolean, getChar, getClassArg, getFloat, getInt, getLines, getLuceneMatchVersion, getOriginalArgs, getPattern, getSet, getSnowballWordSet, getWordSet, isExplicitLuceneMatchVersion, require, require, require, requireBoolean, requireChar, requireFloat, requireInt, setExplicitLuceneMatchVersion, splitAt, splitFileNames`

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

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

- - ### Constructor Detail

    - #### KoreanTokenizerFactory

          public KoreanTokenizerFactory(Map<String,String> args)

      Creates a new KoreanTokenizerFactory

  - ### Method Detail

    - #### inform

          public void inform(ResourceLoader loader)
                      throws IOException

      Specified by:
        `inform` in interface `ResourceLoaderAware`
      Throws:
        `IOException`

    - #### create

          public KoreanTokenizer create(AttributeFactory factory)

      Specified by:
        `create` in class `TokenizerFactory`

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.