gov.llnl.ontology.wordnet.sim
Class HirstStOngeSimilarity

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

public class HirstStOngeSimilarity
extends Object
implements SynsetSimilarity

Implements a word net path similarity measure defined by Hirst and St-Onge. This measure 8 types of valid paths between synsets. The similarity is measured based on the number of links used within a valid path and the number of times the path changes direction. Path directions are broken into three categories: upward, which includes any generalization relation; downward, which includes any specification relation; and side, which includes all other relations. For example, Hypernymy is has an upward direction, Hyponymy has a downward direction, and Similar Too has a side direction. A path may repeat the previous direction as many times as needed and still be considered valid. Invalid paths are not used to compute the similarity. Any path can have a maximum of 5 links.

Formally, the similarity is:
C - pathLength - k * |direction changes| Since C and k are both constants, they are set to 1.

Author:
Keith Stevens

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

HirstStOngeSimilarity

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