public class NGramDistance extends Object implements StringDistance
| Constructor and Description |
|---|
NGramDistance()
Creates an N-Gram distance measure using n-grams of size 2.
|
NGramDistance(int size)
Creates an N-Gram distance measure using n-grams of the specified size.
|
public NGramDistance(int size)
size - The size of the n-gram to be used to compute the string distance.public NGramDistance()
public float getDistance(String source, String target)
StringDistancegetDistance in interface StringDistancesource - The first string.target - The second string.Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.