|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--mark.nlp.data.Instance
|
+--mark.nlp.data.TokenInstance
An instance that contains tokens. The class follows the Immutable design pattern.
| Constructor Summary | |
TokenInstance(TextInstance text,
java.lang.String scannerName)
Initializes the token instance. |
|
| Method Summary | |
java.lang.String |
get(int i)
Returns the i'th token. |
int |
size()
Returns the number of tokens in the instance. |
| Methods inherited from class mark.nlp.data.Instance |
category, setCategory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TokenInstance(TextInstance text,
java.lang.String scannerName)
throws java.lang.Exception
text - the text from which to extract tokens.scannerName - the name of the scanner to use to tokenize the
text.| Method Detail |
public int size()
public java.lang.String get(int i)
i - specifies the token to return. Should be in the range
0..size () - 1.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||