gov.llnl.ontology.wordnet.sim
Class LeacockChodorowScaledSimilarity
java.lang.Object
gov.llnl.ontology.wordnet.sim.LeacockChodorowSimilarity
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
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 |
LeacockChodorowScaledSimilarity
public LeacockChodorowScaledSimilarity(OntologyReader reader)
- Creates an instance of
LeacockChodorowScaledSimilarity
.
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.