com.wcohen.ss
Class Jaro

java.lang.Object
  extended by com.wcohen.ss.AbstractStringDistance
      extended by com.wcohen.ss.Jaro
All Implemented Interfaces:
StringDistance, StringDistanceLearner

public class Jaro
extends AbstractStringDistance

Jaro distance metric. From 'An Application of the Fellegi-Sunter Model of Record Linkage to the 1990 U.S. Decennial Census' by William E. Winkler and Yves Thibaudeau.


Constructor Summary
Jaro()
           
 
Method Summary
 java.lang.String explainScore(StringWrapper s, StringWrapper t)
          This method needs to be implemented by subclasses.
static void main(java.lang.String[] argv)
           
 StringWrapper prepare(java.lang.String s)
          Default way to preprocess a string for distance computation.
 double score(StringWrapper s, StringWrapper t)
          This method needs to be implemented by subclasses.
 java.lang.String toString()
           
 
Methods inherited from class com.wcohen.ss.AbstractStringDistance
addExample, doMain, explainScore, getDistance, hasNextQuery, nextQuery, prepare, prepare, score, setDistanceInstancePool, setStringWrapperPool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Jaro

public Jaro()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

score

public double score(StringWrapper s,
                    StringWrapper t)
Description copied from class: AbstractStringDistance
This method needs to be implemented by subclasses.

Specified by:
score in interface StringDistance
Specified by:
score in class AbstractStringDistance

explainScore

public java.lang.String explainScore(StringWrapper s,
                                     StringWrapper t)
Description copied from class: AbstractStringDistance
This method needs to be implemented by subclasses.

Specified by:
explainScore in interface StringDistance
Specified by:
explainScore in class AbstractStringDistance

prepare

public StringWrapper prepare(java.lang.String s)
Description copied from class: AbstractStringDistance
Default way to preprocess a string for distance computation. If this is an expensive operations, then override this method to return a StringWrapper implementation that caches appropriate information about s.

Specified by:
prepare in interface StringDistance
Overrides:
prepare in class AbstractStringDistance

main

public static void main(java.lang.String[] argv)