|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object leila.relations.Relation leila.relations.SimpleFunction
public class SimpleFunction
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).
SimpleFunction.java is a functional relation (i.e. a many-to-one relation), which reads its examples from a given file. It requires the following parameter in leila.ini:
first second ...Since the relation is functional, any pair with a first component listed in the examples and a "wrong" second component is a counterexample. For example, suppose you store persons with their birth dates in the file. If Chopin is born in 1810, then Chopin/1811, Chopin/1812, ... are implicitly counterexamples.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class leila.relations.Relation |
---|
Relation.WordPairType |
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
examples
Holds the examples |
java.util.regex.Pattern |
pattern
Pattern in the example file |
Constructor Summary | |
---|---|
SimpleFunction()
Reads the examples from the file given by SimpleRelationExamples |
Method Summary | |
---|---|
Relation.WordPairType |
assess(LinkageWord w1,
LinkageWord w2)
Tells whether a pair of words is an example, a counterexample or a candidate |
boolean |
possibleExample(LinkageWord w)
Tells whether the word appears in the examples |
boolean |
requiresCounterexamples()
Returns true |
Methods inherited from class leila.relations.Relation |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.String,java.lang.String> examples
public java.util.regex.Pattern pattern
Constructor Detail |
---|
public SimpleFunction() throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public boolean requiresCounterexamples()
requiresCounterexamples
in class Relation
public Relation.WordPairType assess(LinkageWord w1, LinkageWord w2)
assess
in class Relation
public boolean possibleExample(LinkageWord w)
possibleExample
in class Relation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |