|
||||||||||
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.InterstitialTokens
public class InterstitialTokens
Counts and stores the multi-word expressions that have tokens that are separated by one or more tokens in the sentence that are not also a part of the MWE.
Field Summary | |
---|---|
static String |
ID
The ID for this error detector, "edu.mit.jmwe.error.Interstitial" |
Constructor Summary | |
---|---|
protected |
InterstitialTokens()
This constructor is marked protected so that this class may be subclassed, but not directly instantiated. |
Method Summary | ||
---|---|---|
|
detect(ISentenceResult<T,U> result)
Identifies the multi-word expressions in a unit result that fall under the specific error class this detector identifies. |
|
static InterstitialTokens |
getInstance()
Returns the singleton instance of this class, instantiating if necessary. |
|
static
|
hasParticle(IMWE<T> mwe,
List<T> sentence)
Returns true if the given MWE contains a token that is a particle and is separated from the previous token in the MWE by one or more non-MWE tokens in the sentence. |
|
static
|
isParticle(T token)
Returns true if the specified token is tagged as a particle;
false otherwise |
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 InterstitialTokens()
Method Detail |
---|
public static InterstitialTokens getInstance()
public <T extends IToken,U extends IMarkedSentence<T>> IErrorResult<T> detect(ISentenceResult<T,U> result)
IErrorDetector
T
- the type of tokens contained in the unit.U
- 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
public static <T extends IToken> boolean isParticle(T token)
true
if the specified token is tagged as a particle;
false
otherwise
T
- the type of the token to be checkedtoken
- the token to be checked
true
if the specified token is tagged as a particle;
false
otherwisepublic static <T extends IToken> boolean hasParticle(IMWE<T> mwe, List<T> sentence)
T
- the type of tokens in the sentencemwe
- the MWE being checkedsentence
- the sentence of which the MWE is a part
true
if the given MWE contains a token that is a particle and is
separated from the previous token in the MWE by one or more
non-MWE tokens in the sentence; false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |