public class Token
extends org.apache.uima.jcas.tcas.Annotation
Token is one of the two types commonly produced by a segmenter (the other being Sentence). A Token usually represents a word, although it may be used to represent multiple tightly connected words (e.g. "New York") or parts of a word (e.g. the possessive "'s"). One may choose to split compound words into multiple tokens, e.g. ("CamelCase" -> "Camel", "Case"; "Zauberstab" -> "Zauber", "stab"). Most processing components operate on Tokens, usually within the limits of the surrounding Sentence. E.g. a part-of-speech tagger analyses each Token in a Sentence and assigns a part-of-speech to each Token.
Updated by JCasGen Tue Mar 07 16:08:28 CET 2017 XML source: /Users/bluefire/git/dkpro-core/dkpro-core-api-segmentation-asl/src/main/resources/desc/type/LexicalUnits_customized.xmlModifier and Type | Field and Description |
---|---|
static int |
type |
static int |
typeIndexID |
Modifier | Constructor and Description |
---|---|
protected |
Token()
Never called.
|
|
Token(int addr,
org.apache.uima.jcas.cas.TOP_Type type)
Internal - constructor used by generator
|
|
Token(org.apache.uima.jcas.JCas jcas) |
|
Token(org.apache.uima.jcas.JCas jcas,
int begin,
int end) |
Modifier and Type | Method and Description |
---|---|
TokenForm |
getForm()
getter for form - gets Potentially normalized form of the token text that should be used instead of the covered text if set.
|
String |
getFormValue() |
String |
getId()
getter for id - gets If this unit had an ID in the source format from which it was imported, it may be stored here.
|
Lemma |
getLemma()
getter for lemma - gets
|
String |
getLemmaValue() |
MorphologicalFeatures |
getMorph()
getter for morph - gets The morphological feature associated with this token.
|
org.apache.uima.jcas.tcas.Annotation |
getParent()
getter for parent - gets the parent of this token.
|
POS |
getPos()
getter for pos - gets
|
String |
getPosValue() |
Stem |
getStem()
getter for stem - gets
|
String |
getStemValue() |
String |
getSyntacticFunction()
getter for syntacticFunction - gets
|
String |
getText() |
int |
getTypeIndexID() |
void |
setForm(TokenForm v)
setter for form - sets Potentially normalized form of the token text that should be used instead of the covered text if set.
|
void |
setId(String v)
setter for id - sets If this unit had an ID in the source format from which it was imported, it may be stored here.
|
void |
setLemma(Lemma v)
setter for lemma - sets
|
void |
setMorph(MorphologicalFeatures v)
setter for morph - sets The morphological feature associated with this token.
|
void |
setParent(org.apache.uima.jcas.tcas.Annotation v)
setter for parent - sets the parent of this token.
|
void |
setPos(POS v)
setter for pos - sets
|
void |
setStem(Stem v)
setter for stem - sets
|
void |
setSyntacticFunction(String v)
setter for syntacticFunction - sets
|
void |
setText(String aText)
Set the token text.
|
getBegin, getCoveredText, getEnd, getStart, setBegin, setEnd
addToIndexes, addToIndexes, equals, getAddress, getCAS, getCASImpl, getLowLevelCas, hashCode, removeFromIndexes, removeFromIndexes
clone, getavoidcollisionTypeCode, getBooleanValue, getByteValue, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, prettyPrint, prettyPrint, prettyPrint, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, toString, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
clone, equals, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, hashCode, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue
protected Token()
public Token(int addr, org.apache.uima.jcas.cas.TOP_Type type)
addr
- low level Feature Structure referencetype
- the type of this Feature Structurepublic Token(org.apache.uima.jcas.JCas jcas)
jcas
- JCas to which this Feature Structure belongspublic Token(org.apache.uima.jcas.JCas jcas, int begin, int end)
jcas
- JCas to which this Feature Structure belongsbegin
- offset to the begin spot in the SofAend
- offset to the end spot in the SofApublic int getTypeIndexID()
getTypeIndexID
in class org.apache.uima.jcas.tcas.Annotation
public org.apache.uima.jcas.tcas.Annotation getParent()
Annotation
to avoid adding a dependency on the syntax API module.public void setParent(org.apache.uima.jcas.tcas.Annotation v)
Annotation
to avoid adding a dependency on the syntax API module.v
- value to set into the featurepublic Lemma getLemma()
public void setLemma(Lemma v)
v
- value to set into the featurepublic Stem getStem()
public void setStem(Stem v)
v
- value to set into the featurepublic POS getPos()
public void setPos(POS v)
v
- value to set into the featurepublic MorphologicalFeatures getMorph()
public void setMorph(MorphologicalFeatures v)
v
- value to set into the featurepublic String getId()
public void setId(String v)
v
- value to set into the featurepublic TokenForm getForm()
public void setForm(TokenForm v)
v
- value to set into the featurepublic String getSyntacticFunction()
public void setSyntacticFunction(String v)
v
- value to set into the featurepublic String getPosValue()
POS
annotation linked to this token.public String getStemValue()
Stem
annotation linked to this token.public String getLemmaValue()
Lemma
annotation linked to this token.public String getFormValue()
TokenForm
annotation linked to this token.public String getText()
TokenForm
annotation that might exist.public void setText(String aText)
TokenForm
annotation is created or not. This method can only be used if the document
text has already been set. If a document text is constructed incrementally,
setForm(TokenForm)
has to be called manually and whether or not a form is necessary
needs to be determined based on the current state of the document text being built.aText
- the token text.Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.