org.terrier.terms
Class SnowballStemmer

java.lang.Object
  extended by org.terrier.terms.StemmerTermPipeline
      extended by 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

Author:
Craig Macdonald

Field Summary
protected static java.lang.Object[] emptyArgs
           
protected  java.lang.String language
          The language that we're currently stemming in
protected  org.tartarus.snowball.SnowballProgram stemmer
          The actual Snowball object that does the stemming
protected  java.lang.reflect.Method stemMethod
          The appropriate method.
 
Fields inherited from class org.terrier.terms.StemmerTermPipeline
next
 
Constructor Summary
protected SnowballStemmer(java.lang.String StemLanguage, TermPipeline next)
          Creates a new stemmer object for the language StemLanguage.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Method Detail

stem

public java.lang.String stem(java.lang.String term)
Stems the given term and returns the stem

Parameters:
term - the term to be stemmed.
Returns:
the stemmed form of term


Terrier 3.5. Copyright © 2004-2011 University of Glasgow