de.dfki.lt.hog.container
Class JToken

java.lang.Object
  extended by de.dfki.lt.hog.container.JToken
Direct Known Subclasses:
TnToken, TreeTaggerToken

public class JToken
extends java.lang.Object

Represents a single token as segmented by Jtok. Each JToken consists of the token itself as a String, its length as int, and its offset as int. This class also provides the static method parseJTokAnnotation(String), which receives a JTok annotation and returns an ArrayList of JToken instances.


Field Summary
protected static org.apache.log4j.Logger log
          A logger for Modules
 
Constructor Summary
JToken()
           
JToken(java.lang.String token, int length, int offset)
           
 
Method Summary
 int getLength()
           
 int getOffset()
           
 java.lang.String getToken()
           
 java.lang.String getType()
           
static java.util.ArrayList parseJTokAnnotation(java.lang.String sJTok)
          Parses a JTok XML and returns an ArrayList of JToken instances (each instance containing the token string, the character offset, and the token length
2004-04-21 US mod.
 void setLength(int lenght)
           
 void setOffset(int offset)
           
 void setToken(java.lang.String token)
           
 void setType(java.lang.String type)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
A logger for Modules

Constructor Detail

JToken

public JToken()

JToken

public JToken(java.lang.String token,
              int length,
              int offset)
Method Detail

setType

public void setType(java.lang.String type)

setToken

public void setToken(java.lang.String token)

setLength

public void setLength(int lenght)

setOffset

public void setOffset(int offset)

getType

public java.lang.String getType()

getToken

public java.lang.String getToken()

getLength

public int getLength()

getOffset

public int getOffset()

parseJTokAnnotation

public static java.util.ArrayList parseJTokAnnotation(java.lang.String sJTok)
Parses a JTok XML and returns an ArrayList of JToken instances (each instance containing the token string, the character offset, and the token length
2004-04-21 US mod. 2004-05-14 oe


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object