Package org.terrier.terms
Class SnowballStemmer
- java.lang.Object
-
- org.terrier.terms.StemmerTermPipeline
-
- org.terrier.terms.SnowballStemmer
-
- All Implemented Interfaces:
Stemmer
,TermPipeline
- Direct Known Subclasses:
DanishSnowballStemmer
,DutchSnowballStemmer
,EnglishSnowballStemmer
,FinnishSnowballStemmer
,FrenchSnowballStemmer
,GermanSnowballStemmer
,HungarianSnowballStemmer
,ItalianSnowballStemmer
,NorwegianSnowballStemmer
,PortugueseSnowballStemmer
,RomanianSnowballStemmer
,RussianSnowballStemmer
,SpanishSnowballStemmer
,SwedishSnowballStemmer
,TurkishSnowballStemmer
public abstract class SnowballStemmer extends StemmerTermPipeline
Classic Snowball stemmer implmented by Snowball.- Author:
- Craig Macdonald
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.Object[]
emptyArgs
protected java.lang.String
language
The language that we're currently stemming inprotected org.tartarus.snowball.SnowballProgram
stemmer
The actual Snowball object that does the stemmingprotected java.lang.reflect.Method
stemMethod
The appropriate method.-
Fields inherited from class org.terrier.terms.StemmerTermPipeline
next
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SnowballStemmer(java.lang.String StemLanguage, TermPipeline next)
Creates a new stemmer object for the language StemLanguage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
stem(java.lang.String term)
Stems the given term and returns the stem-
Methods inherited from class org.terrier.terms.StemmerTermPipeline
processTerm, reset
-
-
-
-
Field Detail
-
stemmer
protected org.tartarus.snowball.SnowballProgram stemmer
The actual Snowball object that does the stemming
-
stemMethod
protected java.lang.reflect.Method stemMethod
The appropriate method. Damn reflection APIs.
-
language
protected java.lang.String language
The language that we're currently stemming in
-
emptyArgs
protected static final java.lang.Object[] emptyArgs
-
-
Constructor Detail
-
SnowballStemmer
protected SnowballStemmer(java.lang.String StemLanguage, TermPipeline next)
Creates a new stemmer object for the language StemLanguage.- Parameters:
StemLanguage
- Name of the language to generate the stemmer for. Must be a valid Snowball stemmer language.next
- The next object in the term pipeline
-
-