public class ExtraPrep extends AbstractErrorDetector
He-NN lives-VB in-IN the-DT United-PRP States-PRP of-IN America-PRP.The detector might only return United States;P instead of the correct United_States_of_America;P.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
The ID for this error detector, "edu.mit.jmwe.error.ExtraPrep"
|
Modifier | Constructor and Description |
---|---|
protected |
ExtraPrep()
This constructor is marked protected so that this class may be
subclassed, but not directly instantiated.
|
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.
|
protected static <T extends IToken> |
findTag(IMWE<T> test,
java.lang.String tag)
Returns the index of the first token in the MWE with the specified tag.
|
static ExtraPrep |
getInstance()
Returns the singleton instance of this class, instantiating if necessary.
|
getID
public static final java.lang.String ID
protected ExtraPrep()
public static ExtraPrep getInstance()
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
unitprotected static <T extends IToken> int findTag(IMWE<T> test, java.lang.String tag)
T
- the type of tokens in the MWEtest
- the MWE whose tokens will be searchedtag
- the tag being searched forCopyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.