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.crosswire.jsword.index.lucene.analysis
Class ConfigurableSnowballAnalyzer

    java.lang.Object
      org.apache.lucene.analysis.Analyzer
          org.crosswire.jsword.index.lucene.analysis.AbstractBookAnalyzer
              org.crosswire.jsword.index.lucene.analysis.ConfigurableSnowballAnalyzer

    public class ConfigurableSnowballAnalyzer

extends AbstractBookAnalyzer

Analyzer class to use as a Snowball Analyzer Default behavior: Stemming is done, Stop words not removed A snowball stemmer can be configured by passing the stemmer name to setNaturalLanguage() method. Currently it takes following stemmer names (available stemmers in lucene snowball package net.sf.snowball.ext) Danish Dutch English Finnish French German2 German Italian Kp Lovins Norwegian Porter Portuguese Russian Spanish Swedish This list is expected to expand, as and when Snowball project support more languages

Author:
  sijo cherian [sijocherian at yahoo dot com]
See Also:
  `for license details.
  The copyright to this program is held by it's authors.`

Field Summary
`private static Pattern` | `allowedStemmers`
`private static HashMap` | `defaultStopWordMap`
`private String` | `stemmerName`

Fields inherited from class org.crosswire.jsword.index.lucene.analysis.AbstractBookAnalyzer
`book, doStemming, doStopWords, naturalLanguage, stopSet`

Constructor Summary
`ConfigurableSnowballAnalyzer()`

Method Summary
`void` | `setNaturalLanguage(String name)`
`org.apache.lucene.analysis.TokenStream` | `tokenStream(String fieldName, Reader reader)` Filters `StandardTokenizer` with `StandardFilter`, `LowerCaseFilter`, `StopFilter` if enabled and `SnowballFilter`.

Methods inherited from class org.crosswire.jsword.index.lucene.analysis.AbstractBookAnalyzer
`getBook, getDoStopWords, getNaturalLanguage, setBook, setDoStemming, setDoStopWords, setStopWords`

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

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

Field Detail

### allowedStemmers

    private static Pattern allowedStemmers

### defaultStopWordMap

    private static HashMap defaultStopWordMap

### stemmerName

    private String stemmerName

Constructor Detail

### ConfigurableSnowballAnalyzer

    public ConfigurableSnowballAnalyzer()

Method Detail

### tokenStream

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

  Filters `StandardTokenizer` with `StandardFilter`, `LowerCaseFilter`, `StopFilter` if enabled and `SnowballFilter`.

  Specified by:
    `tokenStream` in class `org.apache.lucene.analysis.Analyzer`

### setNaturalLanguage

    public void setNaturalLanguage(String name)

  Overrides:
    `setNaturalLanguage` in class `AbstractBookAnalyzer`

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