net.java.sen.dictionary
Class CToken

java.lang.Object
  extended by net.java.sen.dictionary.CToken
All Implemented Interfaces:
Cloneable

public final class CToken
extends Object
implements Cloneable

Represents an entry in the token file. A 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.


Field Summary
 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 Summary
CToken()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

public static final long SIZE
The length in bytes of a stored CToken

See Also:
Constant Field Values

rcAttr2

public short rcAttr2
Used in Viterbi path cost calculation


rcAttr1

public short rcAttr1
Used in Viterbi path cost calculation


lcAttr

public short lcAttr
Used in Viterbi path cost calculation


length

public short length
The length of the morpheme this CToken wraps


cost

public short cost
The cost of this CToken


partOfSpeechIndex

public int partOfSpeechIndex
The file index in the part-of-speech information file of the morpheme data this CToken wraps


terminator

public boolean terminator
Constructor Detail

CToken

public CToken()
Method Detail

read

public void read(ByteBuffer buffer)
Read a CToken from a ByteBuffer

Parameters:
buffer - The ByteBuffer to read from

write

public static void write(DataOutput output,
                         CToken token)
                  throws IOException
Write a CToken to a DataOutput

Parameters:
output - The DataOutput to write to
token - The CToken to write
Throws:
IOException

clone

public CToken clone()
Overrides:
clone in class Object


Copyright © 2012. All Rights Reserved.