edu.mit.jmwe.data.concordance
Class ConcordanceTagger.TaggerToken

java.lang.Object
  extended by edu.mit.jmwe.data.Token
      extended by edu.mit.jmwe.data.concordance.ConcordanceToken
          extended by 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

Field Summary
 
Fields inherited from class edu.mit.jmwe.data.concordance.ConcordanceToken
semcorTokenPattern, whitespaceDelimited
 
Constructor Summary
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.
 
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()
           
 
Methods inherited from class edu.mit.jmwe.data.concordance.ConcordanceToken
equals, getPartNumber, getTokenNumber, hashCode, parse, parseList, toString, toString, toToken, toTokens
 
Methods inherited from class edu.mit.jmwe.data.Token
checkStems, checkString, getForm, getStems
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.mit.jmwe.data.IToken
getStems
 
Methods inherited from interface edu.mit.jmwe.data.IHasForm
getForm
 

Constructor Detail

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 intact
tokenNum - 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
Method Detail

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.