public class DefaultMorphologicalProcessor extends java.lang.Object implements MorphologicalProcessor
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.| Modifier and Type | Class and Description |
|---|---|
private class |
DefaultMorphologicalProcessor.LookupInfo |
| Modifier and Type | Field and Description |
|---|---|
private Cache |
_lookupCache |
private Operation[] |
_operations |
static java.lang.String |
CACHE_CAPACITY
Parameter that determines the size of the base form cache
|
private static int |
DEFAULT_CACHE_CAPACITY |
static java.lang.String |
OPERATIONS
Parameter that determines the operations this morphological processor will perform
|
| Constructor and Description |
|---|
DefaultMorphologicalProcessor() |
DefaultMorphologicalProcessor(Operation[] operations) |
DefaultMorphologicalProcessor(Operation[] operations,
int cacheCapacity) |
| Modifier and Type | Method and Description |
|---|---|
private void |
cacheLookupInfo(POSKey key,
DefaultMorphologicalProcessor.LookupInfo info) |
java.lang.Object |
create(java.util.Map params) |
private DefaultMorphologicalProcessor.LookupInfo |
getCachedLookupInfo(POSKey key) |
java.util.List |
lookupAllBaseForms(POS pos,
java.lang.String derivation)
Return all the base forms of derivation
|
IndexWord |
lookupBaseForm(POS pos,
java.lang.String derivation)
Lookup the base form of a word.
|
private IndexWord |
lookupNextBaseForm(POS pos,
java.lang.String derivation,
DefaultMorphologicalProcessor.LookupInfo info)
Lookup the next base form of a pos/word pair.
|
public static final java.lang.String CACHE_CAPACITY
public static final java.lang.String OPERATIONS
private static final int DEFAULT_CACHE_CAPACITY
private Cache _lookupCache
private Operation[] _operations
public DefaultMorphologicalProcessor()
public DefaultMorphologicalProcessor(Operation[] operations)
public DefaultMorphologicalProcessor(Operation[] operations, int cacheCapacity)
public java.lang.Object create(java.util.Map params)
throws JWNLException
create in interface CreateableJWNLExceptionpublic IndexWord lookupBaseForm(POS pos, java.lang.String derivation) throws JWNLException
lookupBaseForm in interface MorphologicalProcessorpos - the part-of-speech of the word to look upderivation - the word to look upJWNLExceptionprivate void cacheLookupInfo(POSKey key, DefaultMorphologicalProcessor.LookupInfo info)
private DefaultMorphologicalProcessor.LookupInfo getCachedLookupInfo(POSKey key)
private IndexWord lookupNextBaseForm(POS pos, java.lang.String derivation, DefaultMorphologicalProcessor.LookupInfo info) throws JWNLException
pos - the part-of-speech of the word to look upderivation - the word to look upJWNLExceptionpublic java.util.List lookupAllBaseForms(POS pos, java.lang.String derivation) throws JWNLException
MorphologicalProcessorlookupAllBaseForms in interface MorphologicalProcessorJWNLException