edu.udo.cs.wvtool.generic.stemmer
Class AbstractWordNetStemmer
java.lang.Object
edu.udo.cs.wvtool.generic.stemmer.AbstractStemmer
edu.udo.cs.wvtool.generic.stemmer.AbstractWordNetStemmer
- All Implemented Interfaces:
- SimpleStemmer, WVTStemmer, TokenEnumeration
- Direct Known Subclasses:
- WordNetHypernymStemmer, WordNetSynonymStemmer
public abstract class AbstractWordNetStemmer
- extends AbstractStemmer
An abstract stemming class using the wordnet dicitionary. Subclasses control
which word form is derived from the base form. The prerequisite for using any
subclass of this class is an installation of WordNet 2.1. Also, you need to
provide the parameter -Dwvtool.wnconfig= to your program, where
is a configuration file for the JWNL system. An example for such a
file can be found in the sample directory. For more information refer to the
JWNL project.
http://jwordnet.sourceforge.net
- Version:
- $Id$
- Author:
- Michael Wurst
Method Summary |
java.lang.String |
getBase(java.lang.String s)
Produce the base form of a given term. |
protected net.didion.jwnl.data.IndexWord |
getIndexWord(java.lang.String s)
|
protected abstract java.lang.String |
getWordForm(net.didion.jwnl.data.IndexWord word)
Obtain a derived form of the specified word. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dictionary
private final net.didion.jwnl.dictionary.Dictionary dictionary
stemmer
private final SimpleStemmer stemmer
maxSenses
private final int maxSenses
AbstractWordNetStemmer
public AbstractWordNetStemmer(SimpleStemmer stemmer,
int maxSenses)
AbstractWordNetStemmer
public AbstractWordNetStemmer()
getIndexWord
protected net.didion.jwnl.data.IndexWord getIndexWord(java.lang.String s)
throws net.didion.jwnl.JWNLException
- Throws:
net.didion.jwnl.JWNLException
getWordForm
protected abstract java.lang.String getWordForm(net.didion.jwnl.data.IndexWord word)
throws net.didion.jwnl.JWNLException
- Obtain a derived form of the specified word.
- Parameters:
word
- a word
- Returns:
- a String representig the derived form
- Throws:
net.didion.jwnl.JWNLException
getBase
public java.lang.String getBase(java.lang.String s)
- Description copied from interface:
SimpleStemmer
- Produce the base form of a given term.
- Specified by:
getBase
in interface SimpleStemmer
- Specified by:
getBase
in class AbstractStemmer
- Parameters:
s
- a term
- Returns:
- the base form of the term