it.unitn.disi.smatch.oracles.wordnet
Class DefaultWordNetMatcher

java.lang.Object
  extended by it.unitn.disi.smatch.oracles.wordnet.DefaultWordNetMatcher
All Implemented Interfaces:
IWordNetMatcher

public class DefaultWordNetMatcher
extends java.lang.Object
implements IWordNetMatcher

Default matcher, queries WordNet via JWNL library.

Author:
Mikalai Yatskevich mikalai.yatskevich@comlab.ox.ac.uk, Aliaksandr Autayeu avtaev@gmail.com

Constructor Summary
DefaultWordNetMatcher()
           
 
Method Summary
 char getRelation(java.util.Vector<java.lang.String> sourceSenses, java.util.Vector<java.lang.String> targetSenses)
          Returns semantic relation holding between two sets of senses.
 char getRelationACoL(IAtomicConceptOfLabel source, IAtomicConceptOfLabel target)
          Retuns semantic relations which hols between two ACoLs.
 boolean isSourceLessGeneralThanTarget(java.lang.String source, java.lang.String target)
          Checks whether source sence less general than target Currently used version of Java WordNet Interface Library finds more general relationships (hypernymy and holonymy) faster than less general so this method just flip the parameters and call isSourceMoreGeneralThanTarget method
 boolean isSourceMoreGeneralThanTarget(java.lang.String source, java.lang.String target)
          Checks whether the source is more general than target.
 boolean isSourceOppositeToTarget(java.lang.String source, java.lang.String target)
          Checks whether the source is disjoint with the target.
 boolean isSourceSynonymTarget(java.lang.String source, java.lang.String target)
          Checks whether the source is a synonym of the target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWordNetMatcher

public DefaultWordNetMatcher()
Method Detail

getRelation

public char getRelation(java.util.Vector<java.lang.String> sourceSenses,
                        java.util.Vector<java.lang.String> targetSenses)
Description copied from interface: IWordNetMatcher
Returns semantic relation holding between two sets of senses.

Specified by:
getRelation in interface IWordNetMatcher
Parameters:
sourceSenses - source set of senses
targetSenses - target set of senses
Returns:
a relation

getRelationACoL

public char getRelationACoL(IAtomicConceptOfLabel source,
                            IAtomicConceptOfLabel target)
Description copied from interface: IWordNetMatcher
Retuns semantic relations which hols between two ACoLs.

Specified by:
getRelationACoL in interface IWordNetMatcher
Parameters:
source - source ACoL
target - targe ACoL
Returns:
a relation

isSourceSynonymTarget

public boolean isSourceSynonymTarget(java.lang.String source,
                                     java.lang.String target)
Description copied from interface: IWordNetMatcher
Checks whether the source is a synonym of the target.

Specified by:
isSourceSynonymTarget in interface IWordNetMatcher
Parameters:
source - source synset id
target - target synset id
Returns:
whether relation holds

isSourceOppositeToTarget

public boolean isSourceOppositeToTarget(java.lang.String source,
                                        java.lang.String target)
Description copied from interface: IWordNetMatcher
Checks whether the source is disjoint with the target.

Specified by:
isSourceOppositeToTarget in interface IWordNetMatcher
Parameters:
source - source synset id
target - target synset id
Returns:
whether relation holds

isSourceLessGeneralThanTarget

public boolean isSourceLessGeneralThanTarget(java.lang.String source,
                                             java.lang.String target)
Checks whether source sence less general than target Currently used version of Java WordNet Interface Library finds more general relationships (hypernymy and holonymy) faster than less general so this method just flip the parameters and call isSourceMoreGeneralThanTarget method

Specified by:
isSourceLessGeneralThanTarget in interface IWordNetMatcher
Parameters:
source -
target -
Returns:

isSourceMoreGeneralThanTarget

public boolean isSourceMoreGeneralThanTarget(java.lang.String source,
                                             java.lang.String target)
Description copied from interface: IWordNetMatcher
Checks whether the source is more general than target.

Specified by:
isSourceMoreGeneralThanTarget in interface IWordNetMatcher
Parameters:
source - source synset id
target - target synset id
Returns:
whether relation holds


© 2010 Knowdive @ DISI