public class InflectionLookup extends HasMWEDetector implements IMWEDetectorFilter
IMWEDesc
.Constructor and Description |
---|
InflectionLookup(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.
|
static <T extends IToken> |
getSurfaceFormDescription(IRootMWEDesc root,
IMWE<T> mwe)
Returns a multi-word expression description with a lemma that is
constructed by concatenating the tokens of the MWE exactly as they appear
in the sentence with underscores.
|
getWrappedDetector
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWrappedDetector
public InflectionLookup(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 null
public <T extends IToken> java.util.List<IMWE<T>> detect(java.util.List<T> sentence)
IMWEDetector
IMWE
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 IMWEDetector
detect
in class HasMWEDetector
T
- 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 null
public static <T extends IToken> IInfMWEDesc getSurfaceFormDescription(IRootMWEDesc root, IMWE<T> mwe)
T
- the type of tokenroot
- the cognizant rootmwe
- the multi-word expression used to construct the description
objectCopyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.