morfologik.fsa
Interface FSASerializer

All Known Implementing Classes:
CFSA2Serializer, FSA5Serializer

public interface FSASerializer

All FSA serializers to binary formats will implement this interface.


Method Summary
 Set<FSAFlags> getFlags()
          Returns the set of flags supported by the serializer (and the output automaton).
<T extends OutputStream>
T
serialize(FSA fsa, T os)
          Serialize a finite state automaton to an output stream.
 FSASerializer withAnnotationSeparator(byte annotationSeparator)
          Supports built-in annotation separator.
 FSASerializer withFiller(byte filler)
          Supports built-in filler separator.
 FSASerializer withLogger(IMessageLogger logger)
          Log extra messages during construction.
 FSASerializer withNumbers()
          Supports built-in right language count on nodes, speeding up perfect hash counts.
 

Method Detail

serialize

<T extends OutputStream> T serialize(FSA fsa,
                                     T os)
                                 throws IOException
Serialize a finite state automaton to an output stream.

Throws:
IOException

getFlags

Set<FSAFlags> getFlags()
Returns the set of flags supported by the serializer (and the output automaton).


withLogger

FSASerializer withLogger(IMessageLogger logger)
Log extra messages during construction.


withFiller

FSASerializer withFiller(byte filler)
Supports built-in filler separator. Only if getFlags() returns FSAFlags.SEPARATORS.


withAnnotationSeparator

FSASerializer withAnnotationSeparator(byte annotationSeparator)
Supports built-in annotation separator. Only if getFlags() returns FSAFlags.SEPARATORS.


withNumbers

FSASerializer withNumbers()
Supports built-in right language count on nodes, speeding up perfect hash counts. Only if getFlags() returns FSAFlags.NUMBERS.



Copyright © 2011. All Rights Reserved.