Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Diff

    The Diff object generates a patch string.

    A patch string is actually a command to a stemmer telling it how to reduce a word to its root. For example, to reduce the word teacher to its root teach the patch string Db would be generated. This command tells the stemmer to delete the last 2 characters from the word teacher to reach the stem (the patch commands are applied starting from the last character in order to save

    Inheritance
    object
    Diff
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Egothor.Stemmer
    Assembly: Lucene.Net.Analysis.Stempel.dll
    Syntax
    public class Diff

    Constructors

    Diff()

    Constructor for the Diff object.

    Declaration
    public Diff()

    Diff(int, int, int, int)

    Constructor for the Diff object

    Declaration
    public Diff(int ins, int del, int rep, int noop)
    Parameters
    Type Name Description
    int ins

    Description of the Parameter

    int del

    Description of the Parameter

    int rep

    Description of the Parameter

    int noop

    Description of the Parameter

    Methods

    Apply(StringBuilder, string)

    Apply the given patch string diff to the given string dest

    Declaration
    public static void Apply(StringBuilder dest, string diff)
    Parameters
    Type Name Description
    StringBuilder dest

    Destination string

    string diff

    Patch string

    Exec(string, string)

    Construct a patch string that transforms a to b.

    Declaration
    public string Exec(string a, string b)
    Parameters
    Type Name Description
    string a

    1st string

    string b

    2nd string

    Returns
    Type Description
    string
    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.