Fork me on GitHub
  • API

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    FST<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Util.Fst
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class FST<T> where T : class
    Type Parameters
    Name Description
    T

    Constructors

    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

    FST(DataInput, Outputs<T>, int)

    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
    int maxBlockBits

    Properties

    ArcCount

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public long ArcCount { get; }
    Property Value
    Type Description
    long

    ArcWithOutputCount

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public long ArcWithOutputCount { get; }
    Property Value
    Type Description
    long

    EmptyOutput

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public T EmptyOutput { get; set; }
    Property Value
    Type Description
    T

    InputType

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public FST.INPUT_TYPE InputType { get; }
    Property Value
    Type Description
    FST.INPUT_TYPE

    NodeCount

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public long NodeCount { get; }
    Property Value
    Type Description
    long

    Outputs

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

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

    Methods

    FindTargetArc(int, Arc<T>, Arc<T>, 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
    int labelToMatch
    FST.Arc<T> follow
    FST.Arc<T> arc
    FST.BytesReader in
    Returns
    Type Description
    FST.Arc<T>

    GetBytesReader()

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

    Declaration
    public FST.BytesReader GetBytesReader()
    Returns
    Type Description
    FST.BytesReader

    GetFirstArc(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>

    GetSizeInBytes()

    Returns bytes used to represent the FST

    Declaration
    public long GetSizeInBytes()
    Returns
    Type Description
    long

    ReadFirstRealTargetArc(long, Arc<T>, BytesReader)

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public FST.Arc<T> ReadFirstRealTargetArc(long node, FST.Arc<T> arc, FST.BytesReader @in)
    Parameters
    Type Name Description
    long node
    FST.Arc<T> arc
    FST.BytesReader in
    Returns
    Type Description
    FST.Arc<T>

    ReadFirstTargetArc(Arc<T>, Arc<T>, 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).

    ReadLastTargetArc(Arc<T>, Arc<T>, 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).

    ReadNextArc(Arc<T>, 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>

    ReadNextArcLabel(Arc<T>, 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
    int

    ReadNextRealArc(Arc<T>, 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>

    ReadRootArcs(Arc<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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public void ReadRootArcs(FST.Arc<T>[] arcs)
    Parameters
    Type Name Description
    Arc<T>[] arcs

    Save(DataOutput)

    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.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public void Save(DataOutput @out)
    Parameters
    Type Name Description
    DataOutput out

    Save(FileInfo)

    Writes an automaton to a file.

    Declaration
    public void Save(FileInfo file)
    Parameters
    Type Name Description
    FileInfo file

    TargetHasArcs(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
    bool
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.