Fork me on GitHub
  • API

    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 J2N.Character.MaxCodePoint.

    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

    This is a Lucene.NET INTERNAL API, use at your own risk

    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
    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 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.