Example usage for org.apache.commons.lang3 StringUtils getJaroWinklerDistance

List of usage examples for org.apache.commons.lang3 StringUtils getJaroWinklerDistance

Introduction

In this page you can find the example usage for org.apache.commons.lang3 StringUtils getJaroWinklerDistance.

Prototype

public static double getJaroWinklerDistance(final CharSequence first, final CharSequence second) 

Source Link

Document

Find the Jaro Winkler Distance which indicates the similarity score between two Strings.

The Jaro measure is the weighted sum of percentage of matched characters from each file and transposed characters.

Usage

From source file:org.eclipse.ebr.maven.eclipseip.KnownLicenses.java

private boolean isSimilar(final String name, final String alternateName) {
    final double distance = StringUtils.getJaroWinklerDistance(name, alternateName);
    return distance >= 0.9;
}