public class MissingFromIndex extends AbstractErrorDetector
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
The ID for this error detector, "edu.mit.jmwe.error.Miss"
|
protected IMWEIndex |
index |
Constructor and Description |
---|
MissingFromIndex(IMWEIndex index)
Constructs a new error detector that looks in the specified index for
missing MWEs
|
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.
|
static <T extends IToken> |
isProblem(IMWE<T> mwe,
IMWEIndex index)
Determines if the specified MWE is a problem, relative to the specified
index, according to this error class.
|
getID
public static final java.lang.String ID
protected final IMWEIndex index
public MissingFromIndex(IMWEIndex index)
index
- the index which backs this detectorjava.lang.NullPointerException
- if the specified index is 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> boolean isProblem(IMWE<T> mwe, IMWEIndex index)
T
- the token type of the MWEmwe
- the MWE in question, may not be null
index
- the index to use, may not be null
true
if the MWE is a problem; false
otherwise.java.lang.NullPointerException
- if the specified MWE or index is null
Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.