Show / Hide Table of Contents

    Class FST<T>

    Represents an finite state machine (FST), using a compact byte[] format.

    The format is similar to what's used by Morfologik (http://sourceforge.net/projects/morfologik).

    See the FST package documentation for some simple examples.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    FST<T>
    Namespace: Lucene.Net.Util.Fst
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class FST<T> : object
    Type Parameters
    Name Description
    T

    Constructors

    | Improve this Doc View Source

    FST(DataInput, Outputs<T>)

    Load a previously saved FST.

    Declaration
    public FST(DataInput in, Outputs<T> outputs)
    Parameters
    Type Name Description
    DataInput in
    Outputs<T> outputs
    | Improve this Doc View Source

    FST(DataInput, Outputs<T>, Int32)

    Load a previously saved FST; maxBlockBits allows you to control the size of the byte[] pages used to hold the FST bytes.

    Declaration
    public FST(DataInput in, Outputs<T> outputs, int maxBlockBits)
    Parameters
    Type Name Description
    DataInput in
    Outputs<T> outputs
    System.Int32 maxBlockBits

    Properties

    | Improve this Doc View Source

    ArcCount

    Declaration
    public long ArcCount { get; }
    Property Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    ArcWithOutputCount

    Declaration
    public long ArcWithOutputCount { get; }
    Property Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    EmptyOutput

    Declaration
    public T EmptyOutput { get; set; }
    Property Value
    Type Description
    T
    | Improve this Doc View Source

    InputType

    Declaration
    public FST.INPUT_TYPE InputType { get; }
    Property Value
    Type Description
    FST.INPUT_TYPE
    | Improve this Doc View Source

    NodeCount

    Declaration
    public long NodeCount { get; }
    Property Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    Outputs

    Declaration
    public Outputs<T> Outputs { get; }
    Property Value
    Type Description
    Outputs<T>

    Methods

    | Improve this Doc View Source

    FindTargetArc(Int32, FST.Arc<T>, FST.Arc<T>, FST.BytesReader)

    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.

    Declaration
    public FST.Arc<T> FindTargetArc(int labelToMatch, FST.Arc<T> follow, FST.Arc<T> arc, FST.BytesReader in)
    Parameters
    Type Name Description
    System.Int32 labelToMatch
    FST.Arc<T> follow
    FST.Arc<T> arc
    FST.BytesReader in
    Returns
    Type Description
    FST.Arc<T>
    | Improve this Doc View Source

    GetBytesReader()

    Returns a FST.BytesReader for this FST, positioned at position 0.

    Declaration
    public FST.BytesReader GetBytesReader()
    Returns
    Type Description
    FST.BytesReader
    | Improve this Doc View Source

    GetFirstArc(FST.Arc<T>)

    Fills virtual 'start' arc, ie, an empty incoming arc to the FST's start node

    Declaration
    public FST.Arc<T> GetFirstArc(FST.Arc<T> arc)
    Parameters
    Type Name Description
    FST.Arc<T> arc
    Returns
    Type Description
    FST.Arc<T>
    | Improve this Doc View Source

    GetSizeInBytes()

    Returns bytes used to represent the FST

    Declaration
    public long GetSizeInBytes()
    Returns
    Type Description
    System.Int64
    | Improve this Doc View Source

    ReadFirstRealTargetArc(Int64, FST.Arc<T>, FST.BytesReader)

    Declaration
    public FST.Arc<T> ReadFirstRealTargetArc(long node, FST.Arc<T> arc, FST.BytesReader in)
    Parameters
    Type Name Description
    System.Int64 node
    FST.Arc<T> arc
    FST.BytesReader in
    Returns
    Type Description
    FST.Arc<T>
    | Improve this Doc View Source

    ReadFirstTargetArc(FST.Arc<T>, FST.Arc<T>, FST.BytesReader)

    Follow the follow arc and read the first arc of its target; this changes the provided arc (2nd arg) in-place and returns it.

    Declaration
    public FST.Arc<T> ReadFirstTargetArc(FST.Arc<T> follow, FST.Arc<T> arc, FST.BytesReader in)
    Parameters
    Type Name Description
    FST.Arc<T> follow
    FST.Arc<T> arc
    FST.BytesReader in
    Returns
    Type Description
    FST.Arc<T>

    Returns the second argument (arc).

    | Improve this Doc View Source

    ReadLastTargetArc(FST.Arc<T>, FST.Arc<T>, FST.BytesReader)

    Follows the follow arc and reads the last arc of its target; this changes the provided arc (2nd arg) in-place and returns it.

    Declaration
    public FST.Arc<T> ReadLastTargetArc(FST.Arc<T> follow, FST.Arc<T> arc, FST.BytesReader in)
    Parameters
    Type Name Description
    FST.Arc<T> follow
    FST.Arc<T> arc
    FST.BytesReader in
    Returns
    Type Description
    FST.Arc<T>

    Returns the second argument (arc).

    | Improve this Doc View Source

    ReadNextArc(FST.Arc<T>, FST.BytesReader)

    In-place read; returns the arc.

    Declaration
    public FST.Arc<T> ReadNextArc(FST.Arc<T> arc, FST.BytesReader in)
    Parameters
    Type Name Description
    FST.Arc<T> arc
    FST.BytesReader in
    Returns
    Type Description
    FST.Arc<T>
    | Improve this Doc View Source

    ReadNextArcLabel(FST.Arc<T>, FST.BytesReader)

    Peeks at next arc's label; does not alter arc. Do not call this if arc.IsLast!

    Declaration
    public int ReadNextArcLabel(FST.Arc<T> arc, FST.BytesReader in)
    Parameters
    Type Name Description
    FST.Arc<T> arc
    FST.BytesReader in
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ReadNextRealArc(FST.Arc<T>, FST.BytesReader)

    Never returns null, but you should never call this if arc.IsLast is true.

    Declaration
    public FST.Arc<T> ReadNextRealArc(FST.Arc<T> arc, FST.BytesReader in)
    Parameters
    Type Name Description
    FST.Arc<T> arc
    FST.BytesReader in
    Returns
    Type Description
    FST.Arc<T>
    | Improve this Doc View Source

    ReadRootArcs(FST.Arc<T>[])

    Declaration
    public void ReadRootArcs(FST.Arc<T>[] arcs)
    Parameters
    Type Name Description
    FST.Arc<T>[] arcs
    | Improve this Doc View Source

    Save(FileInfo)

    Writes an automaton to a file.

    Declaration
    public void Save(FileInfo file)
    Parameters
    Type Name Description
    FileInfo file
    | Improve this Doc View Source

    Save(DataOutput)

    Declaration
    public void Save(DataOutput out)
    Parameters
    Type Name Description
    DataOutput out
    | Improve this Doc View Source

    TargetHasArcs(FST.Arc<T>)

    returns true if the node at this address has any outgoing arcs

    Declaration
    public static bool TargetHasArcs(FST.Arc<T> arc)
    Parameters
    Type Name Description
    FST.Arc<T> arc
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)