edu.mit.csail.brill
Class TaggedToken

java.lang.Object
  |
  +--edu.mit.csail.brill.TaggedToken

public class TaggedToken
extends Object

Object representing a tagged token. A Sentence is a collection of such objects.

Author:
Jimmy Lin

Constructor Summary
TaggedToken(String s, String pos)
          Constructs a tagged token.
TaggedToken(String s, String pos, edu.mit.csail.brill.Sentence sent, int i)
          Constructs a tagged token.
 
Method Summary
 boolean equals(Object obj)
           
 boolean equals(edu.mit.csail.brill.TaggedToken tok)
           
 int getOffset()
          Returns the character offset of this token with respect to the enclosing sentence.
 edu.mit.csail.brill.Sentence getSentence()
          Returns the sentence to which this token belongs.
 String getToken()
          Returns the token string.
 String getTokenType()
          Returns the part-of-speech type of this token.
 int hashCode()
           
 void setOffest(int i)
          Sets the character offset of this token with respect to the enclosing sentence.
 void setSentence(edu.mit.csail.brill.Sentence s)
          Sets the sentence to which this token belongs.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaggedToken

public TaggedToken(String s,
                   String pos)
Constructs a tagged token.

Parameters:
s - the token
pos - the part-of-speech tag

TaggedToken

public TaggedToken(String s,
                   String pos,
                   edu.mit.csail.brill.Sentence sent,
                   int i)
Constructs a tagged token.

Parameters:
s - the token
pos - the part-of-speech tag
sent - the sentence to which this token belongs
i - the offset of this token relative to the enclosing sentence
Method Detail

getOffset

public int getOffset()
Returns the character offset of this token with respect to the enclosing sentence.


getSentence

public edu.mit.csail.brill.Sentence getSentence()
Returns the sentence to which this token belongs.


getToken

public String getToken()
Returns the token string.


getTokenType

public String getTokenType()
Returns the part-of-speech type of this token.


setOffest

public void setOffest(int i)
Sets the character offset of this token with respect to the enclosing sentence.


setSentence

public void setSentence(edu.mit.csail.brill.Sentence s)
Sets the sentence to which this token belongs.


toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

equals

public boolean equals(edu.mit.csail.brill.TaggedToken tok)