edu.mit.jmwe.data.concordance
Class ConcordanceTagger.TaggerToken
java.lang.Object
edu.mit.jmwe.data.Token
edu.mit.jmwe.data.concordance.ConcordanceToken
edu.mit.jmwe.data.concordance.ConcordanceTagger.TaggerToken
- All Implemented Interfaces:
- IConcordanceToken, IHasForm, IToken, edu.stanford.nlp.ling.HasWord, Serializable
- Enclosing class:
- ConcordanceTagger
protected static class ConcordanceTagger.TaggerToken
- extends ConcordanceToken
- implements edu.stanford.nlp.ling.HasWord
Represents a semcor token that is not yet tagged.
- Since:
- jMWE 1.0.0
- Version:
- $Id: ConcordanceTagger.java 620 2011-05-08 21:13:58Z markaf $
- Author:
- M.A. Finlayson
- See Also:
- Serialized Form
Method Summary |
String |
getTag()
Returns the part of speech tag for this token, or null if
the token is not tagged. |
void |
setTag(String tag)
Sets the tag field of this tagger token to the specified tag. |
void |
setWord(String word)
|
String |
word()
|
ConcordanceTagger.TaggerToken
public ConcordanceTagger.TaggerToken(String surfaceText,
int tokenNum,
int partNum,
List<String> stems)
- Constructs a new tagger token object with the specified word, token
number, part number and stems.
- Parameters:
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
- Throws:
NullPointerException
- if the text is null
IllegalArgumentException
- if the text is empty or all whitespace or if the token
number or part number is less than 0.- Since:
- jMWE 1.0.0
word
public String word()
- Specified by:
word
in interface edu.stanford.nlp.ling.HasWord
setWord
public void setWord(String word)
- Specified by:
setWord
in interface edu.stanford.nlp.ling.HasWord
getTag
public String getTag()
- Description copied from interface:
IToken
- Returns the part of speech tag for this token, or
null
if
the token is not tagged. If the part of speech is null
, no
part of speech has yet been assigned.
- Specified by:
getTag
in interface IToken
- Overrides:
getTag
in class Token
- Returns:
- the part of speech tag for this token, or
null
if
the token is not tagged.
setTag
public void setTag(String tag)
- Sets the tag field of this tagger token to the specified tag.
- Parameters:
tag
- the tag to be assigned to this token- Since:
- jMWE 1.0.0
Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.