org.apache.lucene.analysis.snowball

## Class SnowballAnalyzer

- java.lang.Object
- - org.apache.lucene.analysis.Analyzer
  - - org.apache.lucene.analysis.snowball.SnowballAnalyzer

-     public class SnowballAnalyzer
      extends Analyzer

  Filters `StandardTokenizer` with `StandardFilter`, `LowerCaseFilter`, `StopFilter` and `SnowballFilter`. Available stemmers are listed in org.tartarus.snowball.ext. The name of a stemmer is the part of the class name before "Stemmer", e.g., the stemmer in `EnglishStemmer` is named "English".

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

- - ### Field Summary

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

      `overridesTokenStreamMethod`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SnowballAnalyzer(java.lang.String name)` Deprecated. Use `SnowballAnalyzer(Version, String)` instead
    `SnowballAnalyzer(java.lang.String name, java.lang.String[] stopWords)` Deprecated. Use `SnowballAnalyzer(Version, String, String[])` instead
    `SnowballAnalyzer(Version matchVersion, java.lang.String name)` Builds the named analyzer with no stop words.
    `SnowballAnalyzer(Version matchVersion, java.lang.String name, java.util.Set stopWords)` Builds the named analyzer with the given stop words.
    `SnowballAnalyzer(Version matchVersion, java.lang.String name, java.lang.String[] stopWords)` Builds the named analyzer with the given stop words.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TokenStream` | `reusableTokenStream(java.lang.String fieldName, java.io.Reader reader)` Returns a (possibly reused) `StandardTokenizer` filtered by a `StandardFilter`, a `LowerCaseFilter`, a `StopFilter`, and a `SnowballFilter`
    `TokenStream` | `tokenStream(java.lang.String fieldName, java.io.Reader reader)` Constructs a `StandardTokenizer` filtered by a `StandardFilter`, a `LowerCaseFilter`, a `StopFilter`, and a `SnowballFilter`

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

- - ### Constructor Detail

    - #### SnowballAnalyzer

          public SnowballAnalyzer(java.lang.String name)

      Deprecated. Use `SnowballAnalyzer(Version, String)` instead
      Builds the named analyzer with no stop words.

    - #### SnowballAnalyzer

          public SnowballAnalyzer(Version matchVersion,
                                  java.lang.String name)

      Builds the named analyzer with no stop words.

    - #### SnowballAnalyzer

          public SnowballAnalyzer(java.lang.String name,
                                  java.lang.String[] stopWords)

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

    - #### SnowballAnalyzer

          public SnowballAnalyzer(Version matchVersion,
                                  java.lang.String name,
                                  java.lang.String[] stopWords)

      Builds the named analyzer with the given stop words.

    - #### SnowballAnalyzer

          public SnowballAnalyzer(Version matchVersion,
                                  java.lang.String name,
                                  java.util.Set stopWords)

      Builds the named analyzer with the given stop words.

  - ### Method Detail

    - #### tokenStream

          public TokenStream tokenStream(java.lang.String fieldName,
                                         java.io.Reader reader)

      Constructs a `StandardTokenizer` filtered by a `StandardFilter`, a `LowerCaseFilter`, a `StopFilter`, and a `SnowballFilter`
      Specified by:
        `tokenStream` in class `Analyzer`

    - #### reusableTokenStream

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

      Returns a (possibly reused) `StandardTokenizer` filtered by a `StandardFilter`, a `LowerCaseFilter`, a `StopFilter`, and a `SnowballFilter`
      Overrides:
        `reusableTokenStream` in class `Analyzer`
      Throws:
        `java.io.IOException`

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