|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object leila.relations.Relation leila.relations.InstanceOf
public class InstanceOf
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).
InstanceOf.java implements the isa-Relation from WordNet. The class requires the files wn_s.pl and wn_hyp.pl. These files can be downloaded from the WordNet site. They are part of the Prolog version of WordNet. A copy of the files is also provided in the distribution package of LEILA. The following parameters are 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 | |
---|---|
InstanceOf()
Constructor |
Method Summary | |
---|---|
Relation.WordPairType |
assess(LinkageWord w1,
LinkageWord w2)
Judges a pair of words |
int |
hops(java.lang.String s1,
java.lang.String s2)
Returs the minimal number of hops necessary from one concept to another |
protected int |
hops(WordNet.Synset s1,
WordNet.Synset s2)
Helper routine for hops |
static void |
main(java.lang.String[] argv)
Test routine |
boolean |
possibleExample(LinkageWord w)
Tells whether this word is a possible example |
boolean |
requiresCounterexamples()
returns true |
protected int |
seek(WordNet.Synset start,
WordNet.Synset current,
java.util.List<WordNet.Synset> goals,
boolean foundAtomic)
Seeks a goalWordNet.Synset upwards from startWordNet.Synset. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected WordNet wn
Constructor Detail |
---|
public InstanceOf() throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public boolean requiresCounterexamples()
requiresCounterexamples
in class Relation
protected int seek(WordNet.Synset start, WordNet.Synset current, java.util.List<WordNet.Synset> goals, boolean foundAtomic)
public boolean possibleExample(LinkageWord w)
possibleExample
in class Relation
public Relation.WordPairType assess(LinkageWord w1, LinkageWord w2)
assess
in class Relation
public java.lang.String toString()
toString
in class Relation
public int hops(java.lang.String s1, java.lang.String s2)
protected int hops(WordNet.Synset s1, WordNet.Synset s2)
public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |