leila.relations
Class Synonymy

java.lang.Object
  extended by leila.relations.Relation
      extended by leila.relations.Synonymy

public class Synonymy
extends Relation

This class is part of LEILA (http://mpii.de/yago-naga/leila). It is licensed under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0) by the author Fabian M. Suchanek (http://suchanek.name).

Synonymy.java implements the Synonymy-Relation from WordNet. The class requires the file wn_s.pl. It can be downloaded from the WordNet site. It is part of the Prolog version of WordNet. The following parameter is required in leila.ini:


Nested Class Summary
 
Nested classes/interfaces inherited from class leila.relations.Relation
Relation.WordPairType
 
Field Summary
protected  WordNet wn
          Holds the wordnet data
 
Constructor Summary
Synonymy()
          Constructor
 
Method Summary
 Relation.WordPairType assess(LinkageWord w1, LinkageWord w2)
          Judges a pair of words
static void main(java.lang.String[] argv)
          Test routine
 boolean possibleExample(LinkageWord w)
          Tells whether the word is a name
 boolean requiresCounterexamples()
          returns true
 java.lang.String toString()
          Returns all synsets
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wn

protected WordNet wn
Holds the wordnet data

Constructor Detail

Synonymy

public Synonymy()
         throws java.lang.Exception
Constructor

Throws:
java.lang.Exception
Method Detail

requiresCounterexamples

public boolean requiresCounterexamples()
returns true

Overrides:
requiresCounterexamples in class Relation

possibleExample

public boolean possibleExample(LinkageWord w)
Tells whether the word is a name

Overrides:
possibleExample in class Relation

assess

public Relation.WordPairType assess(LinkageWord w1,
                                    LinkageWord w2)
Judges a pair of words

Overrides:
assess in class Relation

toString

public java.lang.String toString()
Returns all synsets

Overrides:
toString in class Relation

main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Test routine

Throws:
java.lang.Exception