gov.llnl.ontology.wordnet.sim
Class LeacockChodorowScaledSimilarity

java.lang.Object
  extended by gov.llnl.ontology.wordnet.sim.LeacockChodorowSimilarity
      extended by gov.llnl.ontology.wordnet.sim.LeacockChodorowScaledSimilarity
All Implemented Interfaces:
SynsetSimilarity

public class LeacockChodorowScaledSimilarity
extends LeacockChodorowSimilarity

Implements a scaled version of the Leacock Chodorow Similarity measure. This is guaranateed to return a value between 0 and 1. The normalization factor is unique for each part of speech and WordNet version. The scaling is done by dividing the raw lch similarity by the maximum similarity for a particular part of speech. This maximum similarity is defined by the depth of the hierarchy for that part of speech.

Author:
Keith Stevens

Constructor Summary
LeacockChodorowScaledSimilarity(OntologyReader reader)
          Creates an instance of LeacockChodorowScaledSimilarity.
 
Method Summary
 double similarity(Synset synset1, Synset synset2)
          Returns the similarity between synset1 and synset2 based on how they are connected in the word net hierarchy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeacockChodorowScaledSimilarity

public LeacockChodorowScaledSimilarity(OntologyReader reader)
Creates an instance of LeacockChodorowScaledSimilarity.

Method Detail

similarity

public double similarity(Synset synset1,
                         Synset synset2)
Returns the similarity between synset1 and synset2 based on how they are connected in the word net hierarchy.

Specified by:
similarity in interface SynsetSimilarity
Overrides:
similarity in class LeacockChodorowSimilarity


Copyright © 2010-2011. All Rights Reserved.