gov.llnl.ontology.wordnet.sim
Class LeacockChodorowSimilarity

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

public class LeacockChodorowSimilarity
extends Object
implements SynsetSimilarity

Implements the Leacock Chodorow Similarity measure. This measure scores Synset similarity based on the shortest path connecting the two and the maximum depth of the taxonomy for the particular part of speech. The score is given as -log(p/2d) where p is the shortest path length and d is the maximum taxonomy depth. If synset1 and synset2 have different PartsOfSpeech, -1 is returned.

Author:
Keith Stevens

Constructor Summary
LeacockChodorowSimilarity(OntologyReader reader)
          Creates an instance of LeacockChodorowSimilarity.
 
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

LeacockChodorowSimilarity

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

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


Copyright © 2010-2011. All Rights Reserved.