|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.washington.cs.knowitall.Token
public class Token
A representation of a token in a sentence.
| Nested Class Summary | |
|---|---|
protected static class |
Token.ChunkTagExpression
A regular expression that is evaluated against the chunk tag portion of a token. |
protected static class |
Token.Expression
An expression that is evaluated against a token. |
protected static class |
Token.LemmaExpression
A regular expression that is evaluated against the lemma portion of a token. |
protected static class |
Token.PosTagExpression
A regular expression that is evaluated against the POS tag portion of a token. |
protected static class |
Token.StartTypeExpression
A regular expression that is evaluated against the type portion of a token. |
protected static class |
Token.StringExpression
A regular expression that is evaluated against the string portion of a token. |
protected static class |
Token.TypeExpression
A regular expression that is evaluated against the type portion of a token. |
| Field Summary | |
|---|---|
int |
index
|
Sentence |
sentence
|
static com.google.common.base.Function<Token,String> |
toStringFunction
|
| Constructor Summary | |
|---|---|
Token(Sentence sentence,
int index)
|
|
| Method Summary | |
|---|---|
String |
chunk()
The chunk tag of this token. |
boolean |
containsType(String descriptor)
Check if this token is part of a tag with the specified descriptor. |
Collection<Type> |
getType(String descriptor)
|
String |
lemma()
The lemma of this token. |
String |
pos()
The part of speech tag of this token. |
String |
string()
The string of this token. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final Sentence sentence
public final int index
public static final com.google.common.base.Function<Token,String> toStringFunction
| Constructor Detail |
|---|
public Token(Sentence sentence,
int index)
| Method Detail |
|---|
public boolean containsType(String descriptor)
descriptor -
public Collection<Type> getType(String descriptor)
public String string()
public String lemma()
public String pos()
public String chunk()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||