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

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

public class InMemoryWordNetBinaryArray
extends java.lang.Object
implements IWordNetMatcher

Implements version of WN matcher which use a fast internal data structure.

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

Constructor Summary
InMemoryWordNetBinaryArray()
           
 
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 the source is less general than target.
 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.
 void reportUsage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryWordNetBinaryArray

public InMemoryWordNetBinaryArray()
                           throws SMatchException
Throws:
SMatchException
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

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

isSourceLessGeneralThanTarget

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

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

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

reportUsage

public void reportUsage()


© 2010 Knowdive @ DISI