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
Inherited Members
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 |