org.egothor.stemmer
Class Stock

java.lang.Object
  extended byorg.egothor.stemmer.Stock

public class Stock
extends java.lang.Object

The Stock object is a stemmer. It consists of a set of stems and a stemming trie. The set of stems specifies the set of words that should not be transformed to their base forms (the wrong word might result).

To save memory, the stem set can be destroyed and a simple strategy can be used in its place. For example, only transform longer terms (5 or more characters), and if the transformation generates a short stem (under 4 characters), do not accept it and instead use the original word rather than the very short stem that could be a mistake.

Author:
Leo Galambos

Constructor Summary
Stock()
          Constructor for the Stock object.
 
Method Summary
 Trie getStemmer(java.util.Locale lang)
          Return the Trie (stemmer) for the given language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stock

public Stock()
Constructor for the Stock object. It constructs the default stemmer that is loaded from a file that is specified by the system default.stemmer property.

Method Detail

getStemmer

public Trie getStemmer(java.util.Locale lang)
Return the Trie (stemmer) for the given language.

Parameters:
lang - the language for which a stemmer should be returned
Returns:
a Trie (stemmer)