de.unima.ki.mmatch.smeasures
Class Measure

java.lang.Object
  extended by de.unima.ki.mmatch.smeasures.Measure

public class Measure
extends java.lang.Object


Constructor Summary
Measure()
           
 
Method Summary
 java.lang.Double compare(Term t1, Term t2)
           
 java.lang.Double compareTerms(Term t1, Term t2, boolean normalized)
          This Method compares two terms and declares the similarity between them, based on the Levenshtein measure.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Measure

public Measure()
Method Detail

compare

public java.lang.Double compare(Term t1,
                                Term t2)
                         throws MMatchException
Parameters:
t1 - The first term.
t2 - The second term.
Returns:
The similarity value of the terms: similarity value of the normalized terms and similarity value of the non-normalized terms.
Throws:
MMatchException

compareTerms

public java.lang.Double compareTerms(Term t1,
                                     Term t2,
                                     boolean normalized)
                              throws MMatchException
This Method compares two terms and declares the similarity between them, based on the Levenshtein measure. If the two terms differs too much in the length, the similarity is lesser. The similarity of the HeadNouns is more important than the similarity of the other words. The distance between two words in the term is also important.

Parameters:
t1 - The first term
t2 - The second term
normalized - True if the similarity value of the normalized terms is required.
Returns:
Similarity (Levenshtein) between the first and the second term
Throws:
MMatchException