serf.data
Class TitleMatcher

java.lang.Object
  extended by serf.data.TitleMatcher
All Implemented Interfaces:
AtomicMatch

public class TitleMatcher
extends java.lang.Object
implements AtomicMatch


Constructor Summary
TitleMatcher()
           
TitleMatcher(float th)
           
 
Method Summary
 boolean valuesMatch(java.lang.String s1, java.lang.String s2)
          Test if titles match In this implementation the jaro similarity metric is used to compare string values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TitleMatcher

public TitleMatcher()

TitleMatcher

public TitleMatcher(float th)
Method Detail

valuesMatch

public boolean valuesMatch(java.lang.String s1,
                           java.lang.String s2)
Test if titles match In this implementation the jaro similarity metric is used to compare string values. Very similar strings will have a jaro score close to 1. Different strings have a jaro score close to 0.

Specified by:
valuesMatch in interface AtomicMatch
Parameters:
s1 - title 1
s2 - title 2
Returns:
true if jaro.score(title1, title2) > threshold (threshold defaults to 0.9)