Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.util
Class Levenshtein

    java.lang.Object
      org.basex.util.Levenshtein

    public final class Levenshtein

extends java.lang.Object

This class assembles methods for fuzzy token matching.

Author:
  Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Method Summary
`static boolean` | `contains(byte[] tok, byte[] sub)` Checks if the first token approximately contains the second fulltext term.
`static 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`

Method Detail

### contains

    public static boolean contains(byte[] tok,
                                   byte[] sub)

  Checks if the first token approximately contains the second fulltext term.

  Parameters:
    `tok` - first token
    `sub` - second token
  Returns:
    result of test

### similar

    public static boolean similar(byte[] tok,
                                  byte[] sub)

  Compares two character arrays for similarity.

  Parameters:
    `tok` - token to be compared
    `sub` - second token to be compared
  Returns:
    true if the arrays are similar

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD