FST
Represents an finite state machine (FST), using a compact byte[] format.
The format is similar to what's used by Morfologik (https://github.com/morfologik/morfologik-stemming).
See the package documentation for some simple examples.
Constructors
Load a previously saved FST with a DataInput for metdata using an OnHeapFSTStore with maxBlockBits set to .DEFAULT_MAX_BLOCK_BITS
Types
Reads bytes stored in an FST.
Represents the FST metadata.
Specifies allowed range of each int input label for this FST.
Properties
Functions
Finds an arc leaving the incoming arc, replacing the arc in place. This returns null if the arc was not found, else the incoming arc.
Returns a BytesReader for this FST, positioned at position 0.
Fills virtual 'start' arc, ie, an empty incoming arc to the FST's start node
Returns whether arc's target points to a node in expanded format (fixed length arcs).
Return the memory usage of this object in bytes. Negative values are illegal.
Reads a Continuous node arc, with the provided index in the label range.
Reads a present direct addressing node arc, with the provided index in the label range.
Follow the follow arc and read the first arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
Reads the last arc of a continuous node.
Reads the last arc of a direct addressing node. This method is equivalent to call .readArcByDirectAddressing with rangeIndex equal to arc.numArcs() - 1, but it is faster.
Follows the follow arc and reads the last arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
In-place read; returns the arc.
Peeks at next arc's label; does not alter arc. Do not call this if arc.isLast()!
Never returns null, but you should never call this if arc.isLast() is true.
Writes an automaton to a file.
Save the FST to DataOutput.