gov.llnl.ontology.wordnet.sim
Class PathSimilarity

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

public class PathSimilarity
extends Object
implements SynsetSimilarity

Computes the similarity to be the shortest path that connects them when using only parent and child links. Scores range from 0 to 1, with 0 being returned for Synsets that have no connecting path.

Author:
Keith Stevens

Constructor Summary
PathSimilarity()
           
 
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

PathSimilarity

public PathSimilarity()
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.