public class StempelStemmer
extends java.lang.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(java.io.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(java.io.InputStream stemmerTable)
Load a stemmer table from an inputstream.
|
java.lang.StringBuilder |
stem(java.lang.CharSequence word)
Stem a word.
|
public StempelStemmer(java.io.InputStream stemmerTable) throws java.io.IOException
stemmerTable
- stemmer table.java.io.IOException
public StempelStemmer(Trie stemmer)
stemmer
- pre-loaded stemmer tablepublic static Trie load(java.io.InputStream stemmerTable) throws java.io.IOException
java.io.IOException
public java.lang.StringBuilder stem(java.lang.CharSequence word)
word
- input word to be stemmed.Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.