StringDistance (Lucene 2.4.1 API)
Keywords: org.apache.lucene.search.spell.StringDistance interface

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

## org.apache.lucene.search.spell
Interface StringDistance

All Known Implementing Classes:
  JaroWinklerDistance, LevensteinDistance

    public interface StringDistance

Interface for string distances.

Method Summary
`float` | `getDistance(String s1, String s2)` Returns a float between 0 and 1 based on how similar the specified strings are to one another.

Method Detail

### getDistance

    float getDistance(String s1,
                      String s2)

  Returns a float between 0 and 1 based on how similar the specified strings are to one another. Returning a value of 0 means the specified strings are identical and 1 means the string are maximally different.

  Parameters:
    `s1` - The first string.
    `s2` - The second string.
  Returns:
    a float between 0 and 1 based on how similar the specified strings are to one another.

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

Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.