com.wcohen.ss.tokens
Class TagLinkToken

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

public class TagLinkToken
extends AbstractStringDistance


Constructor Summary
TagLinkToken()
          TagLinkToken default constructor.
TagLinkToken(double tr)
          TagLinkToken constrctur.
 
Method Summary
 java.lang.String explainScore(StringWrapper s, StringWrapper t)
          explainScore returns an explanation of how the string distance was computed.
 double getMatched()
          getMatched return the number of matched character.
 double getTr()
          getTr return the contant value Gamma.
 double score(StringWrapper s, StringWrapper t)
          score return the a strng distance value between 0 and 1 of a pair of tokens.
 void setTreshold(double treshold)
          setTreshold set a new value to the constant Gamma.
 java.lang.String toString()
          toString return the name of the string metric.
 
Methods inherited from class com.wcohen.ss.AbstractStringDistance
addExample, doMain, explainScore, getDistance, hasNextQuery, nextQuery, prepare, prepare, prepare, score, setDistanceInstancePool, setStringWrapperPool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TagLinkToken

public TagLinkToken()
TagLinkToken default constructor. Instance of this class with parameter gamma = 0.3


TagLinkToken

public TagLinkToken(double tr)
TagLinkToken constrctur. Instance of this class with user specified parameter.

Parameters:
tr - double
Method Detail

score

public double score(StringWrapper s,
                    StringWrapper t)
score return the a strng distance value between 0 and 1 of a pair of tokens. Where 1 is the maximum similarity.

Specified by:
score in interface StringDistance
Specified by:
score in class AbstractStringDistance
Parameters:
S - StringWrapper
T - StringWrapper
Returns:
double

explainScore

public java.lang.String explainScore(StringWrapper s,
                                     StringWrapper t)
explainScore returns an explanation of how the string distance was computed.

Specified by:
explainScore in interface StringDistance
Specified by:
explainScore in class AbstractStringDistance
Parameters:
S - StringWrapper
T - StringWrapper
Returns:
String

getMatched

public double getMatched()
getMatched return the number of matched character. This value is requiered for the MR-IDF method as proposed in Horacio & Salhi (2006)

Returns:
double

getTr

public double getTr()
getTr return the contant value Gamma.

Returns:
double

setTreshold

public void setTreshold(double treshold)
setTreshold set a new value to the constant Gamma.

Parameters:
treshold - double

toString

public java.lang.String toString()
toString return the name of the string metric.

Overrides:
toString in class java.lang.Object
Returns:
String