csli.util.nlp
Class StemmerFactory

java.lang.Object
  extended by csli.util.nlp.StemmerFactory
All Implemented Interfaces:
Serializable

public class StemmerFactory
extends Object
implements Serializable

A factory that returns a word stemmer.

See Also:
Serialized Form

Field Summary
static String DEFAULT_KEY
           
 
Constructor Summary
StemmerFactory()
           
 
Method Summary
static Stemmer getNewStemmer()
          Get a new stemmer of the class specified by the default util.nlp.stemmer config key
static Stemmer getNewStemmer(String key)
          Get a new stemmer of the class specified by the given config key OR class name
static Stemmer getStemmer()
          Get the static instance of the default stemmer; if none exists, a new one will be created, of the class specified by the default util.nlp.stemmer config key
static Stemmer getStemmer(String key)
          Get the static instance of the stemmer associated with the given config key OR class name; if none exists, create a new one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_KEY

public static final String DEFAULT_KEY
See Also:
Constant Field Values
Constructor Detail

StemmerFactory

public StemmerFactory()
Method Detail

getStemmer

public static Stemmer getStemmer()
Get the static instance of the default stemmer; if none exists, a new one will be created, of the class specified by the default util.nlp.stemmer config key

Returns:
null if the key doesn't exist, class can't be instantiated etc.

getStemmer

public static Stemmer getStemmer(String key)
Get the static instance of the stemmer associated with the given config key OR class name; if none exists, create a new one

Parameters:
key - the name of the desired class, or a config key which points at one
Returns:
null if the key doesn't exist, class can't be instantiated etc.

getNewStemmer

public static Stemmer getNewStemmer()
Get a new stemmer of the class specified by the default util.nlp.stemmer config key

Returns:
null if the key doesn't exist, class can't be instantiated etc.

getNewStemmer

public static Stemmer getNewStemmer(String key)
Get a new stemmer of the class specified by the given config key OR class name

Parameters:
key - the name of the desired class, or a config key which points at one
Returns:
null if the key doesn't exist, class can't be instantiated etc.