public class StempelStemmer extends Object
Stemmer class is a convenient facade for other stemmer-related classes. The core stemming algorithm and its implementation is taken verbatim from the Egothor project ( www.egothor.org ).
Even though the stemmer tables supplied in the distribution package are built for Polish language, there is nothing language-specific here.
Constructor and Description |
---|
StempelStemmer(InputStream stemmerTable)
Create a Stemmer using selected stemmer table
|
StempelStemmer(Trie stemmer)
Create a Stemmer using pre-loaded stemmer table
|
Modifier and Type | Method and Description |
---|---|
static Trie |
load(InputStream stemmerTable)
Load a stemmer table from an inputstream.
|
StringBuilder |
stem(CharSequence word)
Stem a word.
|
public StempelStemmer(InputStream stemmerTable) throws IOException
stemmerTable
- stemmer table.IOException
public StempelStemmer(Trie stemmer)
stemmer
- pre-loaded stemmer tablepublic static Trie load(InputStream stemmerTable) throws IOException
IOException
public StringBuilder stem(CharSequence word)
word
- input word to be stemmed.Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.