DutchAnalyzer (Lucene 3.6.2 API)
Keywords: org.apache.lucene.analysis.nl.DutchAnalyzer class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.analysis.nl
Class DutchAnalyzer

    java.lang.Object
      org.apache.lucene.analysis.Analyzer
          org.apache.lucene.analysis.ReusableAnalyzerBase
              org.apache.lucene.analysis.nl.DutchAnalyzer

All Implemented Interfaces:
  Closeable

    public final class DutchAnalyzer

extends org.apache.lucene.analysis.ReusableAnalyzerBase

`Analyzer` for Dutch language.

Supports an external list of stopwords (words that will not be indexed at all), an external list of exclusions (word that will not be stemmed, but indexed) and an external list of word-stem pairs that overrule the algorithm (dictionary stemming). A default set of stopwords is used unless an alternative list is specified, but the exclusion list is empty by default.

You must specify the required `Version` compatibility when creating DutchAnalyzer:

- As of 3.6, `DutchAnalyzer(Version, Set)` and `DutchAnalyzer(Version, Set, Set)` also populate the default entries for the stem override dictionary
- As of 3.1, Snowball stemming is done with SnowballFilter, LowerCaseFilter is used prior to StopFilter, and Snowball stopwords are used by default.
- As of 2.9, StopFilter preserves position increments

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

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
`org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents`

Field Summary
`static String` | `DEFAULT_STOPWORD_FILE` File containing default Dutch stopwords.
`static String[]` | `DUTCH_STOP_WORDS` Deprecated. use `getDefaultStopSet()` instead

Constructor Summary
`DutchAnalyzer(org.apache.lucene.util.Version matchVersion)` Builds an analyzer with the default stop words (`getDefaultStopSet()`) and a few default entries for the stem exclusion table.
`DutchAnalyzer(org.apache.lucene.util.Version matchVersion, File stopwords)` Deprecated. use `DutchAnalyzer(Version, Set)` instead
`DutchAnalyzer(org.apache.lucene.util.Version matchVersion, HashSet<?> stopwords)` Deprecated. use `DutchAnalyzer(Version, Set)` instead
`DutchAnalyzer(org.apache.lucene.util.Version matchVersion, Set<?> stopwords)`
`DutchAnalyzer(org.apache.lucene.util.Version matchVersion, Set<?> stopwords, Set<?> stemExclusionTable)`
`DutchAnalyzer(org.apache.lucene.util.Version matchVersion, Set<?> stopwords, Set<?> stemExclusionTable, org.apache.lucene.analysis.CharArrayMap<String> stemOverrideDict)`
`DutchAnalyzer(org.apache.lucene.util.Version matchVersion, String... stopwords)` Deprecated. use `DutchAnalyzer(Version, Set)` instead

Method Summary
`protected org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents` | `createComponents(String fieldName, Reader aReader)` Returns a (possibly reused) `TokenStream` which tokenizes all the text in the provided `Reader`.
`static Set<?>` | `getDefaultStopSet()` Returns an unmodifiable instance of the default stop-words set.
`void` | `setStemDictionary(File stemdictFile)` Deprecated. This prevents reuse of TokenStreams. If you wish to use a custom stem dictionary, create your own Analyzer with `StemmerOverrideFilter`
`void` | `setStemExclusionTable(File exclusionlist)` Deprecated. use `DutchAnalyzer(Version, Set, Set)` instead
`void` | `setStemExclusionTable(HashSet<?> exclusionlist)` Deprecated. use `DutchAnalyzer(Version, Set, Set)` instead
`void` | `setStemExclusionTable(String... exclusionlist)` Deprecated. use `DutchAnalyzer(Version, Set, Set)` instead

Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
`initReader, reusableTokenStream, tokenStream`

Methods inherited from class org.apache.lucene.analysis.Analyzer
`close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DUTCH_STOP_WORDS

    @Deprecated
    public static final String[] DUTCH_STOP_WORDS

  Deprecated. use `getDefaultStopSet()` instead
  List of typical Dutch stopwords.

### DEFAULT_STOPWORD_FILE

    public static final String DEFAULT_STOPWORD_FILE

  File containing default Dutch stopwords.

  See Also:
    Constant Field Values

Constructor Detail

### DutchAnalyzer

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

  Builds an analyzer with the default stop words (`getDefaultStopSet()`) and a few default entries for the stem exclusion table.

### DutchAnalyzer

    public DutchAnalyzer(org.apache.lucene.util.Version matchVersion,
                         Set<?> stopwords)

### DutchAnalyzer

    public DutchAnalyzer(org.apache.lucene.util.Version matchVersion,
                         Set<?> stopwords,
                         Set<?> stemExclusionTable)

### DutchAnalyzer

    public DutchAnalyzer(org.apache.lucene.util.Version matchVersion,
                         Set<?> stopwords,
                         Set<?> stemExclusionTable,
                         org.apache.lucene.analysis.CharArrayMap<String> stemOverrideDict)

### DutchAnalyzer

    @Deprecated
    public DutchAnalyzer(org.apache.lucene.util.Version matchVersion,
                                    String... stopwords)

  Deprecated. use `DutchAnalyzer(Version, Set)` instead

  Builds an analyzer with the given stop words.

  Parameters:
    `matchVersion` -
    `stopwords` -

### DutchAnalyzer

    @Deprecated
    public DutchAnalyzer(org.apache.lucene.util.Version matchVersion,
                                    HashSet<?> stopwords)

  Deprecated. use `DutchAnalyzer(Version, Set)` instead

  Builds an analyzer with the given stop words.

  Parameters:
    `stopwords` -

### DutchAnalyzer

    @Deprecated
    public DutchAnalyzer(org.apache.lucene.util.Version matchVersion,
                                    File stopwords)

  Deprecated. use `DutchAnalyzer(Version, Set)` instead

  Builds an analyzer with the given stop words.

  Parameters:
    `stopwords` -

Method Detail

### getDefaultStopSet

    public static Set<?> getDefaultStopSet()

  Returns an unmodifiable instance of the default stop-words set.

  Returns:
    an unmodifiable instance of the default stop-words set.

### setStemExclusionTable

    @Deprecated
    public void setStemExclusionTable(String... exclusionlist)

  Deprecated. use `DutchAnalyzer(Version, Set, Set)` instead

  Builds an exclusionlist from an array of Strings.

  Parameters:
    `exclusionlist` -

### setStemExclusionTable

    @Deprecated
    public void setStemExclusionTable(HashSet<?> exclusionlist)

  Deprecated. use `DutchAnalyzer(Version, Set, Set)` instead

  Builds an exclusionlist from a Hashtable.

### setStemExclusionTable

    @Deprecated
    public void setStemExclusionTable(File exclusionlist)

  Deprecated. use `DutchAnalyzer(Version, Set, Set)` instead

  Builds an exclusionlist from the words contained in the given file.

### setStemDictionary

    @Deprecated
    public void setStemDictionary(File stemdictFile)

  Deprecated. This prevents reuse of TokenStreams. If you wish to use a custom stem dictionary, create your own Analyzer with `StemmerOverrideFilter`

  Reads a stemdictionary file , that overrules the stemming algorithm This is a textfile that contains per line `word\tstem`, i.e: two tab seperated words

### createComponents

    protected org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                                                     Reader aReader)

  Returns a (possibly reused) `TokenStream` which tokenizes all the text in the provided `Reader`.

  Specified by:
    `createComponents` in class `org.apache.lucene.analysis.ReusableAnalyzerBase`
  Returns:
    A `TokenStream` built from a `StandardTokenizer` filtered with `StandardFilter`, `LowerCaseFilter`, `StopFilter`, `KeywordMarkerFilter` if a stem exclusion set is provided, `StemmerOverrideFilter`, and `SnowballFilter`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD