Show / Hide Table of Contents

    Class LevenshteinAutomata

    Class to construct DFAs that match a word within some edit distance.

    Implements the algorithm described in: Schulz and Mihov: Fast String Correction with Levenshtein Automata

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    LevenshteinAutomata
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Util.Automaton
    Assembly: Lucene.Net.dll
    Syntax
    public class LevenshteinAutomata

    Constructors

    | Improve this Doc View Source

    LevenshteinAutomata(Int32[], Int32, Boolean)

    Expert: specify a custom maximum possible symbol (alphaMax); default is MAX_CODE_POINT.

    Declaration
    public LevenshteinAutomata(int[] word, int alphaMax, bool withTranspositions)
    Parameters
    Type Name Description
    System.Int32[] word
    System.Int32 alphaMax
    System.Boolean withTranspositions
    | Improve this Doc View Source

    LevenshteinAutomata(String, Boolean)

    Create a new LevenshteinAutomata for some input string. Optionally count transpositions as a primitive edit.

    Declaration
    public LevenshteinAutomata(string input, bool withTranspositions)
    Parameters
    Type Name Description
    System.String input
    System.Boolean withTranspositions

    Fields

    | Improve this Doc View Source

    MAXIMUM_SUPPORTED_DISTANCE

    @lucene.internal

    Declaration
    public const int MAXIMUM_SUPPORTED_DISTANCE = 2
    Field Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    ToAutomaton(Int32)

    Compute a DFA that accepts all strings within an edit distance of n.

    All automata have the following properties:

    • They are deterministic (DFA).
    • There are no transitions to dead states.
    • They are not minimal (some transitions could be combined).

    Declaration
    public virtual Automaton ToAutomaton(int n)
    Parameters
    Type Name Description
    System.Int32 n
    Returns
    Type Description
    Automaton

    Extension Methods

    Number.IsNumber(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Licensed to the Apache Software Foundation (ASF)