org.apache.lucene.analysis.cz

## Class CzechAnalyzer

- java.lang.Object
- - org.apache.lucene.analysis.Analyzer
  - - org.apache.lucene.analysis.cz.CzechAnalyzer

-     public final class CzechAnalyzer
      extends org.apache.lucene.analysis.Analyzer

  `Analyzer` for Czech language.

  Supports an external list of stopwords (words that will not be indexed at all). A default set of stopwords is used unless an alternative list is specified.

  NOTE: This class uses the same `Version` dependent settings as `StandardAnalyzer`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `CZECH_STOP_WORDS` List of typical stopwords.

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

      `overridesTokenStreamMethod`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CzechAnalyzer()` Deprecated. Use `CzechAnalyzer(Version)` instead
    `CzechAnalyzer(java.io.File stopwords)` Deprecated. Use `CzechAnalyzer(Version, File)` instead
    `CzechAnalyzer(java.util.HashSet stopwords)` Deprecated. Use `CzechAnalyzer(Version, HashSet)` instead
    `CzechAnalyzer(java.lang.String[] stopwords)` Deprecated. Use `CzechAnalyzer(Version, String[])` instead
    `CzechAnalyzer(org.apache.lucene.util.Version matchVersion)` Builds an analyzer with the default stop words (`CZECH_STOP_WORDS`).
    `CzechAnalyzer(org.apache.lucene.util.Version matchVersion, java.io.File stopwords)` Builds an analyzer with the given stop words.
    `CzechAnalyzer(org.apache.lucene.util.Version matchVersion, java.util.HashSet stopwords)`
    `CzechAnalyzer(org.apache.lucene.util.Version matchVersion, java.lang.String[] stopwords)` Builds an analyzer with the given stop words.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `loadStopWords(java.io.InputStream wordfile, java.lang.String encoding)` Loads stopwords hash from resource stream (file, database...).
    `org.apache.lucene.analysis.TokenStream` | `reusableTokenStream(java.lang.String fieldName, java.io.Reader reader)` Returns a (possibly reused) `TokenStream` which tokenizes all the text in the provided `Reader`.
    `org.apache.lucene.analysis.TokenStream` | `tokenStream(java.lang.String fieldName, java.io.Reader reader)` Creates a `TokenStream` which tokenizes all the text in the provided `Reader`.

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

      `close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStream`

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

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

- - ### Field Detail

    - #### CZECH_STOP_WORDS

          public static final java.lang.String[] CZECH_STOP_WORDS

      List of typical stopwords.

  - ### Constructor Detail

    - #### CzechAnalyzer

          public CzechAnalyzer()

      Deprecated. Use `CzechAnalyzer(Version)` instead
      Builds an analyzer with the default stop words (`CZECH_STOP_WORDS`).

    - #### CzechAnalyzer

          public CzechAnalyzer(org.apache.lucene.util.Version matchVersion)

      Builds an analyzer with the default stop words (`CZECH_STOP_WORDS`).

    - #### CzechAnalyzer

          public CzechAnalyzer(java.lang.String[] stopwords)

      Deprecated. Use `CzechAnalyzer(Version, String[])` instead
      Builds an analyzer with the given stop words.

    - #### CzechAnalyzer

          public CzechAnalyzer(org.apache.lucene.util.Version matchVersion,
                               java.lang.String[] stopwords)

      Builds an analyzer with the given stop words.

    - #### CzechAnalyzer

          public CzechAnalyzer(java.util.HashSet stopwords)

      Deprecated. Use `CzechAnalyzer(Version, HashSet)` instead

    - #### CzechAnalyzer

          public CzechAnalyzer(org.apache.lucene.util.Version matchVersion,
                               java.util.HashSet stopwords)

    - #### CzechAnalyzer

          public CzechAnalyzer(java.io.File stopwords)
                        throws java.io.IOException

      Deprecated. Use `CzechAnalyzer(Version, File)` instead
      Builds an analyzer with the given stop words.
      Throws:
        `java.io.IOException`

    - #### CzechAnalyzer

          public CzechAnalyzer(org.apache.lucene.util.Version matchVersion,
                               java.io.File stopwords)
                        throws java.io.IOException

      Builds an analyzer with the given stop words.
      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### loadStopWords

          public void loadStopWords(java.io.InputStream wordfile,
                                    java.lang.String encoding)

      Loads stopwords hash from resource stream (file, database...).
      Parameters:
        `wordfile` - File containing the wordlist
        `encoding` - Encoding used (win-1250, iso-8859-2, ...), null for default system encoding

    - #### tokenStream

          public final org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName,
                                                                          java.io.Reader reader)

      Creates a `TokenStream` which tokenizes all the text in the provided `Reader`.
      Specified by:
        `tokenStream` in class `org.apache.lucene.analysis.Analyzer`
      Returns:
        A `TokenStream` built from a `StandardTokenizer` filtered with `StandardFilter`, `LowerCaseFilter`, and `StopFilter`

    - #### reusableTokenStream

          public org.apache.lucene.analysis.TokenStream reusableTokenStream(java.lang.String fieldName,
                                                                            java.io.Reader reader)
                                                                     throws java.io.IOException

      Returns a (possibly reused) `TokenStream` which tokenizes all the text in the provided `Reader`.
      Overrides:
        `reusableTokenStream` in class `org.apache.lucene.analysis.Analyzer`
      Returns:
        A `TokenStream` built from a `StandardTokenizer` filtered with `StandardFilter`, `LowerCaseFilter`, and `StopFilter`
      Throws:
        `java.io.IOException`

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