C# Class Egothor.Stemmer.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

Mostra file Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
Apply ( StringBuilder dest, string diff ) : void

Apply the given patch string diff to the given string dest

Diff ( ) : System

Constructor for the Diff object.

Diff ( int ins, int del, int rep, int noop ) : System

Constructor for the Diff object

Exec ( string a, string b ) : string

Construct a patch string that transforms a to b.

Method Details

Apply() public static method

Apply the given patch string diff to the given string dest
public static Apply ( StringBuilder dest, string diff ) : void
dest StringBuilder Destination string
diff string Patch string
return void

Diff() public method

Constructor for the Diff object.
public Diff ( ) : System
return System

Diff() public method

Constructor for the Diff object
public Diff ( int ins, int del, int rep, int noop ) : System
ins int Description of the Parameter
del int Description of the Parameter
rep int Description of the Parameter
noop int Description of the Parameter
return System

Exec() public method

Construct a patch string that transforms a to b.
public Exec ( string a, string b ) : string
a string 1st string
b string 2nd string
return string