public class DetectorDisagreement extends AbstractErrorDetector
Modifier and Type | Field and Description |
---|---|
protected IMWEDetector |
d |
static java.lang.String |
ID
The ID for this error detector, "edu.mit.jmwe.error.Disagree"
|
Constructor and Description |
---|
DetectorDisagreement(IMWEDetector d)
Constructs a new error detector that uses the specified MWE detector for
backing.
|
Modifier and Type | Method and Description |
---|---|
<T extends IToken,S extends IMarkedSentence<T>> |
detect(ISentenceResult<T,S> result)
Identifies the multi-word expressions in a unit result that fall under
the specific error class this detector identifies.
|
IMWEDetector |
getDetector()
Returns the MWE detector for this error detector.
|
static <T extends IToken,S extends IMarkedSentence<T>> |
isProblem(IMWE<T> mwe,
ISentenceResult<T,S> result,
IMWEDetector detector)
Determines if the specified MWE is a problem relative to the specified
sentence according to this error class.
|
getID
public static final java.lang.String ID
protected final IMWEDetector d
public DetectorDisagreement(IMWEDetector d)
d
- the detector used by this error detectorjava.lang.NullPointerException
- if the specified detector is null
public IMWEDetector getDetector()
null
public <T extends IToken,S extends IMarkedSentence<T>> IErrorResult<T> detect(ISentenceResult<T,S> result)
IErrorDetector
T
- the type of tokens contained in the unit.S
- the type of marked sentence whose results are stored. Is
parameterized by tokens of type T.result
- the sentence result obtained by running an IMWEDetector over a
unitpublic static <T extends IToken,S extends IMarkedSentence<T>> boolean isProblem(IMWE<T> mwe, ISentenceResult<T,S> result, IMWEDetector detector)
T
- the token type of the MWES
- the sentence type of the Sentencemwe
- the MWE in question, may not be null
result
- the result to be used, may not be null
detector
- the detector to use to find the problemtrue
if the MWE is a problem; false
otherwise.java.lang.NullPointerException
- if the specified mwe is null
Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.