Package org.egothor.stemmer
Class Diff
- java.lang.Object
-
- org.egothor.stemmer.Diff
-
public class Diff extends Object
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
apply(StringBuilder dest, CharSequence diff)
Apply the given patch string diff to the given string dest.String
exec(String a, String b)
Construct a patch string that transforms a to b.
-
-
-
Constructor Detail
-
Diff
public Diff()
Constructor for the Diff object.
-
Diff
public Diff(int ins, int del, int rep, int noop)
Constructor for the Diff object- Parameters:
ins
- Description of the Parameterdel
- Description of the Parameterrep
- Description of the Parameternoop
- Description of the Parameter
-
-
Method Detail
-
apply
public static void apply(StringBuilder dest, CharSequence diff)
Apply the given patch string diff to the given string dest.- Parameters:
dest
- Destination stringdiff
- Patch string
-
-