public interface TokenStructure extends LabeledStructure
Modifier and Type | Method and Description |
---|---|
void |
addComment(java.lang.String comment,
int at_index) |
TokenNode |
addTokenNode()
Adds a token node with index n + 1, where n is the index of the last token node.
|
TokenNode |
addTokenNode(int index)
Adds a token node with index index.
|
java.util.ArrayList<java.lang.String> |
getComment(int at_index) |
int |
getHighestTokenIndex()
Returns the index of the last token node.
|
int |
getSentenceID()
Returns the sentence ID
|
java.util.SortedSet<java.lang.Integer> |
getTokenIndices()
Returns a sorted set of integers {s,...
|
TokenNode |
getTokenNode(int index)
Returns the token node with index index.
|
boolean |
hasComments() |
boolean |
hasTokens()
Returns true if the token structure (sentence) has any token nodes, otherwise false.
|
int |
nTokenNode()
Returns the number of token nodes in the token structure (sentence).
|
void |
setSentenceID(int sentenceID)
Sets the sentence ID
|
addLabel, checkInLabelSet, checkOutNewLabelSet, clear, getSymbolTables, setSymbolTables
TokenNode addTokenNode() throws MaltChainedException
MaltChainedException
TokenNode addTokenNode(int index) throws MaltChainedException
index
- the index of the token node.MaltChainedException
void addComment(java.lang.String comment, int at_index)
java.util.ArrayList<java.lang.String> getComment(int at_index)
boolean hasComments()
TokenNode getTokenNode(int index)
index
- the index of the token node.MaltChainedException
int nTokenNode()
java.util.SortedSet<java.lang.Integer> getTokenIndices()
int getHighestTokenIndex()
boolean hasTokens()
int getSentenceID()
void setSentenceID(int sentenceID)
sentenceID
- a sentence IDCopyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.