morfologik.fsa
Class CFSAEncoder

java.lang.Object
  extended by morfologik.fsa.CFSAEncoder

public final class CFSAEncoder
extends Object

Re-encode FSA5 automaton to a more compact representation (CFSA).


Method Summary
static void convert(InputStream fsa5, OutputStream cfsa)
          Convert FSA in version 5 to CFSA.
protected  void doLabelMapping()
          Attempt to fit labels into the flags field in arcs with NEXT bit set.
protected  void serialize(OutputStream os)
          Serialize the current representation of the automaton.
protected  int updateOffsets()
          Update node offsets according to their current states and encoding schemes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doLabelMapping

protected void doLabelMapping()
Attempt to fit labels into the flags field in arcs with NEXT bit set.


updateOffsets

protected int updateOffsets()
Update node offsets according to their current states and encoding schemes.

Returns:
Returns the total length of automaton's arcs and nodes at the moment.

serialize

protected void serialize(OutputStream os)
                  throws IOException
Serialize the current representation of the automaton.

Throws:
IOException

convert

public static void convert(InputStream fsa5,
                           OutputStream cfsa)
                    throws IOException
Convert FSA in version 5 to CFSA.

Throws:
IOException


Copyright © 2010. All Rights Reserved.