|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.jmwe.harness.result.error.AbstractErrorDetector
edu.mit.jmwe.harness.result.error.ExtraPrep
public class ExtraPrep
Finds the proper noun multi-word expressions that were truncated incorrectly because of a token with a prepositional tag. For example:
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.
Field Summary | |
---|---|
static String |
ID
The ID for this error detector, "edu.mit.jmwe.error.ExtraPrep" |
Constructor Summary | |
---|---|
protected |
ExtraPrep()
This constructor is marked protected so that this class may be subclassed, but not directly instantiated. |
Method Summary | ||
---|---|---|
|
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
|
findTag(IMWE<T> test,
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. |
Methods inherited from class edu.mit.jmwe.harness.result.error.AbstractErrorDetector |
---|
getID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ID
Constructor Detail |
---|
protected ExtraPrep()
Method Detail |
---|
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
unit
protected static <T extends IToken> int findTag(IMWE<T> test, String tag)
T
- the type of tokens in the MWEtest
- the MWE whose tokens will be searchedtag
- the tag being searched for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |