public final class CToken extends Object implements Cloneable
CToken contains
fixed-length data used in Viterbi path cost calculation, and a pointer to
its linked variable-length morpheme data in the part-of-speech information
file. CTokens are wrapped within Nodes to form
the Viterbi lattice.| Modifier and Type | Field and Description |
|---|---|
short |
cost
The cost of this CToken
|
short |
lcAttr
Used in Viterbi path cost calculation
|
short |
length
The length of the morpheme this CToken wraps
|
int |
partOfSpeechIndex
The file index in the part-of-speech information file of the morpheme
data this CToken wraps
|
short |
rcAttr1
Used in Viterbi path cost calculation
|
short |
rcAttr2
Used in Viterbi path cost calculation
|
static long |
SIZE
The length in bytes of a stored CToken
|
boolean |
terminator |
| Constructor and Description |
|---|
CToken() |
| Modifier and Type | Method and Description |
|---|---|
CToken |
clone() |
void |
read(ByteBuffer buffer)
Read a CToken from a ByteBuffer
|
static void |
write(DataOutput output,
CToken token)
Write a CToken to a DataOutput
|
public static final long SIZE
public short rcAttr2
public short rcAttr1
public short lcAttr
public short length
public short cost
public int partOfSpeechIndex
public boolean terminator
public void read(ByteBuffer buffer)
buffer - The ByteBuffer to read frompublic static void write(DataOutput output, CToken token) throws IOException
output - The DataOutput to write totoken - The CToken to writeIOException