org.vivoweb.harvester.score.algorithm
Class NormalizedDamerauLevenshteinDifference

java.lang.Object
  extended by org.vivoweb.harvester.score.algorithm.NormalizedDamerauLevenshteinDifference
All Implemented Interfaces:
Algorithm

public class NormalizedDamerauLevenshteinDifference
extends java.lang.Object
implements Algorithm

Normalized Damerau-Levenshtein Difference Score Algorithm

Author:
Christopher Haines hainesc@ctrip.ufl.edu

Constructor Summary
NormalizedDamerauLevenshteinDifference()
           
 
Method Summary
 float calculate(java.lang.CharSequence itemX, java.lang.CharSequence itemY)
          Perform a calculation to determine what percent match the given Strings are
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NormalizedDamerauLevenshteinDifference

public NormalizedDamerauLevenshteinDifference()
Method Detail

calculate

public float calculate(java.lang.CharSequence itemX,
                       java.lang.CharSequence itemY)
Description copied from interface: Algorithm
Perform a calculation to determine what percent match the given Strings are

Specified by:
calculate in interface Algorithm
Parameters:
itemX - compare this with the other String
itemY - compare this with the other String
Returns:
a float (0.0, 1.0) representing what percent match the given Strings are