public final class AnalyzedToken extends Object
| Constructor and Description |
|---|
AnalyzedToken(String token,
String posTag,
String lemma) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getLemma() |
String |
getPOSTag() |
String |
getToken() |
String |
getTokenInflected()
Like
getLemma(), but returns the token if the lemma is null |
int |
hashCode() |
boolean |
hasNoTag() |
boolean |
isWhitespaceBefore() |
boolean |
matches(AnalyzedToken an) |
void |
setNoPOSTag(boolean noTag)
If other readings of the token have real POS tags,
you can set the flag here that they do, so that the
test in the Element class would be correct for all
cases.
|
void |
setWhitespaceBefore(boolean whitespaceBefore) |
String |
toString() |
public String getToken()
@Nullable public String getPOSTag()
null@Nullable public String getLemma()
nullpublic String getTokenInflected()
getLemma(), but returns the token if the lemma is nullpublic void setWhitespaceBefore(boolean whitespaceBefore)
public boolean isWhitespaceBefore()
public boolean matches(AnalyzedToken an)
an - AnalyzedToken to testpublic boolean hasNoTag()
public void setNoPOSTag(boolean noTag)