protected static class ConcordanceTagger.TaggerToken extends ConcordanceToken implements edu.stanford.nlp.ling.HasWord
semcorTokenPattern, whitespaceDelimited
Constructor and Description |
---|
TaggerToken(java.lang.String surfaceText,
int tokenNum,
int partNum,
java.util.List<java.lang.String> stems)
Constructs a new tagger token object with the specified word, token
number, part number and stems.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getTag()
Returns the part of speech tag for this token, or
null if
the token is not tagged. |
void |
setTag(java.lang.String tag)
Sets the tag field of this tagger token to the specified tag.
|
void |
setWord(java.lang.String word) |
java.lang.String |
word() |
equals, getPartNumber, getTokenNumber, hashCode, parse, parseList, toString, toString, toToken, toTokens
checkStems, checkString, getForm, getStems
public TaggerToken(java.lang.String surfaceText, int tokenNum, int partNum, java.util.List<java.lang.String> stems)
surfaceText
- the surface form of the token as it appears in the
sentence, capitalization intacttokenNum
- the token number. Must be greater than or equal to 0.partNum
- the part number representing the index of the token in a
multi-word expression, 0 if it is not part of one. Must be
greater than or equal to 0.stems
- the list of stems, possibly empty or null
java.lang.NullPointerException
- if the text is null
java.lang.IllegalArgumentException
- if the text is empty or all whitespace or if the token
number or part number is less than 0.public java.lang.String word()
word
in interface edu.stanford.nlp.ling.HasWord
public void setWord(java.lang.String word)
setWord
in interface edu.stanford.nlp.ling.HasWord
public java.lang.String getTag()
IToken
null
if
the token is not tagged. If the part of speech is null
, no
part of speech has yet been assigned.public void setTag(java.lang.String tag)
tag
- the tag to be assigned to this tokenCopyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.