class BiSegGraph
extends java.lang.Object
For each start offset, a list of possible token pairs is stored.
| Modifier and Type | Field and Description |
|---|---|
private static BigramDictionary |
bigramDict |
private java.util.List<SegToken> |
segTokenList |
private java.util.Map<java.lang.Integer,java.util.ArrayList<SegTokenPair>> |
tokenPairListTable |
| Constructor and Description |
|---|
BiSegGraph(SegGraph segGraph) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSegTokenPair(SegTokenPair tokenPair)
Add a
SegTokenPair |
private void |
generateBiSegGraph(SegGraph segGraph) |
java.util.List<SegToken> |
getShortPath()
Find the shortest path with the Viterbi algorithm.
|
int |
getToCount()
Get the number of
SegTokenPair entries in the table. |
java.util.List<SegTokenPair> |
getToList(int to)
Return a
List of all token pairs at this offset (index of the second token) |
boolean |
isToExist(int to)
Returns true if their is a list of token pairs at this offset (index of the second token)
|
java.lang.String |
toString() |
private java.util.Map<java.lang.Integer,java.util.ArrayList<SegTokenPair>> tokenPairListTable
private java.util.List<SegToken> segTokenList
private static BigramDictionary bigramDict
public BiSegGraph(SegGraph segGraph)
private void generateBiSegGraph(SegGraph segGraph)
public boolean isToExist(int to)
to - index of the second token in the token pairpublic java.util.List<SegTokenPair> getToList(int to)
List of all token pairs at this offset (index of the second token)to - index of the second token in the token pairList of token pairs.public void addSegTokenPair(SegTokenPair tokenPair)
SegTokenPairtokenPair - SegTokenPairpublic int getToCount()
SegTokenPair entries in the table.SegTokenPair entriespublic java.util.List<SegToken> getShortPath()
Listpublic java.lang.String toString()
toString in class java.lang.Object