Class DefaultMorphologicalProcessor
java.lang.Object
net.didion.jwnl.dictionary.morph.DefaultMorphologicalProcessor
- All Implemented Interfaces:
MorphologicalProcessor, Createable
Default implementation of
MorphologicalProcessor. This isn't a true
morpological 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 concatanation.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultMorphologicalProcessor(Operation[] operations) DefaultMorphologicalProcessor(Operation[] operations, int cacheCapacity) -
Method Summary
-
Field Details
-
CACHE_CAPACITY
Parameter that determines the size of the base form cache- See Also:
-
OPERATIONS
Parameter that determines the operations this morphological processor will perform- See Also:
-
-
Constructor Details
-
DefaultMorphologicalProcessor
public DefaultMorphologicalProcessor() -
DefaultMorphologicalProcessor
-
DefaultMorphologicalProcessor
-
-
Method Details
-
create
- Specified by:
createin interfaceCreateable- Throws:
JWNLException
-
lookupBaseForm
Lookup the base form of a word. Given a lemma, finds the WordNet entry most like that lemma. This function returns the first base form found. Subsequent calls to this function with the same part-of-speech and word will return the same base form. To find another base form for the pos/word, call lookupNextBaseForm.- Specified by:
lookupBaseFormin interfaceMorphologicalProcessor- Parameters:
pos- the part-of-speech of the word to look upderivation- the word to look up- Returns:
- IndexWord the IndexWord found during lookup
- Throws:
JWNLException
-
lookupAllBaseForms
Description copied from interface:MorphologicalProcessorReturn all the base forms of derivation- Specified by:
lookupAllBaseFormsin interfaceMorphologicalProcessor- Throws:
JWNLException
-