public class InflectionPattern extends HasMWEDetector implements IMWEDetectorFilter
IMWEDetector to find multi-word expressions in a
sentence but discards inflected multi-word expressions if the inflected form
does not correspond to an inflection pattern give by a set of inflection
rules.
This implementation uses the default set of inflection rules listed in
InflectionRule. Subclasses may change the set of rules by overriding
the getRules() method.
| Constructor and Description |
|---|
InflectionPattern(IMWEDetector d)
Constructs the detector from the given backing detector.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends IToken> |
detect(java.util.List<T> sentence)
Given a list of tokens, the detector searches for the MWEs in the list.
|
java.util.Collection<IInflectionRule> |
getRules()
Returns the set of inflection rules to be used by this detector.
|
getWrappedDetectorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWrappedDetectorpublic InflectionPattern(IMWEDetector d)
d - the IMWEDetector that will be used to back this detector. May
not be null.java.lang.NullPointerException - if the backing detector is nullpublic <T extends IToken> java.util.List<IMWE<T>> detect(java.util.List<T> sentence)
IMWEDetectorIMWE objects representing these
multi-word expressions. The method returns an empty list if no MWEs are
found; the method should never return null.detect in interface IMWEDetectordetect in class HasMWEDetectorT - the type of the tokens in the sentencesentence - a sentence which the detector should search for multi-word
expressions.IMWE objects representing the multi-word
expressions found in the sentence. Returns an empty list if no
multi-word expressions are found; never returns nullpublic java.util.Collection<IInflectionRule> getRules()
null.Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.