|
MaltParser 1.4.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.maltparser.core.syntaxgraph.SyntaxGraph
org.maltparser.core.syntaxgraph.Sentence
public class Sentence
| Field Summary | |
|---|---|
protected int |
sentenceID
|
protected SortedMap<Integer,Token> |
terminalNodes
|
protected ObjectPoolList<Token> |
terminalPool
|
| Fields inherited from class org.maltparser.core.syntaxgraph.SyntaxGraph |
|---|
labelSetPool, numberOfComponents, symbolTables |
| Constructor Summary | |
|---|---|
Sentence(SymbolTableHandler symbolTables)
|
|
| Method Summary | |
|---|---|
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. |
void |
clear()
Resets the structure. |
int |
getHighestTokenIndex()
Returns the index of the last token node. |
protected Token |
getOrAddTerminalNode(int index)
|
int |
getSentenceID()
Returns the sentence ID |
SortedSet<Integer> |
getTokenIndices()
Returns a sorted set of integers {s,... |
TokenNode |
getTokenNode(int index)
Returns the token node with index index. |
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 |
String |
toString()
|
void |
update(Observable o,
Object str)
|
| Methods inherited from class org.maltparser.core.syntaxgraph.SyntaxGraph |
|---|
addLabel, checkInLabelSet, checkOutNewLabelSet, getSymbolTables, setSymbolTables |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.maltparser.core.syntaxgraph.LabeledStructure |
|---|
addLabel, checkInLabelSet, checkOutNewLabelSet, getSymbolTables, setSymbolTables |
| Field Detail |
|---|
protected final ObjectPoolList<Token> terminalPool
protected final SortedMap<Integer,Token> terminalNodes
protected int sentenceID
| Constructor Detail |
|---|
public Sentence(SymbolTableHandler symbolTables)
throws MaltChainedException
MaltChainedException| Method Detail |
|---|
public TokenNode addTokenNode(int index)
throws MaltChainedException
TokenStructure
addTokenNode in interface TokenStructureindex - the index of the token node.
MaltChainedException
public TokenNode addTokenNode()
throws MaltChainedException
TokenStructure
addTokenNode in interface TokenStructureMaltChainedExceptionpublic int nTokenNode()
TokenStructure
nTokenNode in interface TokenStructurepublic boolean hasTokens()
TokenStructure
hasTokens in interface TokenStructure
protected Token getOrAddTerminalNode(int index)
throws MaltChainedException
MaltChainedExceptionpublic SortedSet<Integer> getTokenIndices()
TokenStructure
getTokenIndices in interface TokenStructurepublic int getHighestTokenIndex()
TokenStructure
getHighestTokenIndex in interface TokenStructurepublic TokenNode getTokenNode(int index)
TokenStructure
getTokenNode in interface TokenStructureindex - the index of the token node.
public int getSentenceID()
TokenStructure
getSentenceID in interface TokenStructurepublic void setSentenceID(int sentenceID)
TokenStructure
setSentenceID in interface TokenStructuresentenceID - a sentence ID
public void clear()
throws MaltChainedException
Structure
clear in interface Structureclear in class SyntaxGraphMaltChainedException
public void update(Observable o,
Object str)
update in interface Observerpublic String toString()
toString in class Object
|
MaltParser 1.4.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||