public class DefaultMorphologicalProcessor extends java.lang.Object implements MorphologicalProcessor
MorphologicalProcessor
. This isn't a true
morphological analyzer (it doesn't figure out all the characteristics of each word
it processes). This is basically a stemmer that uses WordNet exception files instead
of complex stemming rules. It also tries to be intelligent by removing delimiters and
doing concatenation.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CACHE_CAPACITY
Parameter that determines the size of the base form cache.
|
static java.lang.String |
OPERATIONS
Parameter that determines the operations this morphological processor will perform.
|
Constructor and Description |
---|
DefaultMorphologicalProcessor(Dictionary dictionary,
java.util.Map<java.lang.String,Param> params) |
Modifier and Type | Method and Description |
---|---|
Dictionary |
getDictionary() |
java.util.List<java.lang.String> |
lookupAllBaseForms(POS pos,
java.lang.String derivation)
Returns all base forms of the derivation.
|
IndexWord |
lookupBaseForm(POS pos,
java.lang.String derivation)
Lookup the first base form of a word.
|
public static final java.lang.String CACHE_CAPACITY
public static final java.lang.String OPERATIONS
public DefaultMorphologicalProcessor(Dictionary dictionary, java.util.Map<java.lang.String,Param> params) throws JWNLException
JWNLException
public IndexWord lookupBaseForm(POS pos, java.lang.String derivation) throws JWNLException
lookupBaseForm
in interface MorphologicalProcessor
pos
- the part-of-speech of the word to look upderivation
- the word to look upJWNLException
- JWNLExceptionpublic java.util.List<java.lang.String> lookupAllBaseForms(POS pos, java.lang.String derivation) throws JWNLException
lookupAllBaseForms
in interface MorphologicalProcessor
pos
- part of speechderivation
- derivationJWNLException
- JWNLExceptionpublic Dictionary getDictionary()