public class Perfect extends java.lang.Object implements IMWEDetector
Sentences passed to this detector must implement IMarkedSentence
,
otherwise the detect(List)
method will throw an exception.
Constructor and Description |
---|
Perfect(IAnswerKey key)
Constructs a new detector that uses the specified answer key
|
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.
|
public Perfect(IAnswerKey key)
key
- the answer key to use, may not be null
.java.lang.NullPointerException
- if the specified answer key 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
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
Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.