|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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
Constructor Summary | |
Diff()
Constructor for the Diff object. |
|
Diff(int ins,
int del,
int rep,
int noop)
Constructor for the Diff object |
Method Summary | |
static java.lang.StringBuffer |
apply(java.lang.StringBuffer orig,
java.lang.String diff)
Apply the given patch string diff to the given string orig and return the new String with the patch command executed.. |
java.lang.String |
exec(java.lang.String a,
java.lang.String b)
Construct a patch string that transforms a to b. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Diff()
public Diff(int ins, int del, int rep, int noop)
ins
- Description of the Parameterdel
- Description of the Parameterrep
- Description of the Parameternoop
- Description of the ParameterMethod Detail |
public static java.lang.StringBuffer apply(java.lang.StringBuffer orig, java.lang.String diff)
orig
- java.lang.StringBuffer Original stringdiff
- java.lang.String Patch string
public java.lang.String exec(java.lang.String a, java.lang.String b)
a
- String 1st stringb
- String 2nd string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |