morfologik.fsa.bytes
Class FSA5Serializer
java.lang.Object
morfologik.fsa.bytes.FSA5Serializer
public final class FSA5Serializer
- extends Object
Serializes in-memory byte-labeled automata to FSA5 format. The
automaton after serialization may not be minimal because FSA5 keeps
acceptance (final) flag on transitions and FSABuilder keeps this
information inside States. The difference in practice is about 10% of
the overall size; if super-compact format is required, use the original
fsa package. Having distinct acceptor States is useful
in other applications.
|
Method Summary |
|
serialize(State s,
T os)
Serialize root state s to an output stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fillerByte
public byte fillerByte
- See Also:
FSA5.filler
annotationByte
public byte annotationByte
- See Also:
FSA5.annotation
FSA5Serializer
public FSA5Serializer()
serialize
public <T extends OutputStream> T serialize(State s,
T os)
throws IOException
- Serialize root state
s to an output stream.
- Returns:
- Returns
os for chaining.
- Throws:
IOException
Copyright © 2010. All Rights Reserved.