|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.util.Levenshtein
public final class Levenshtein
This class assembles methods for fuzzy token matching.
| Constructor Summary | |
|---|---|
Levenshtein()
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
contains(byte[] tok,
byte[] sub)
Checks if the first token approximately contains the second fulltext term. |
boolean |
ftChar(byte ch)
Checks if the specified character is a letter; special characters are converted to the standard ASCII charset. |
int |
ftNorm(int ch)
Returns a lowercase ASCII character of the specified fulltext character. |
int |
ls(byte[] tok,
int ts,
int tl,
byte[] sub,
int k)
Calculates a Levenshtein distance. |
boolean |
similar(byte[] tok,
byte[] sub)
Compares two character arrays for similarity. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Levenshtein()
| Method Detail |
|---|
public boolean similar(byte[] tok,
byte[] sub)
tok - token to be comparedsub - second token to be compared
public int ls(byte[] tok,
int ts,
int tl,
byte[] sub,
int k)
tok - token to be comparedts - start position in tokentl - token length to be checkedsub - sub token to be comparedk - maximum number of accepted errors
public boolean contains(byte[] tok,
byte[] sub)
tok - first tokensub - second token
public boolean ftChar(byte ch)
ch - character to be converted
public int ftNorm(int ch)
ch - character to be converted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||