leila.relations
Class Headquarters

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

public class Headquarters
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).

Headquarters.java implements a the company/headquarters-relation. It requires the example pairs in a file of the form

company / headquarters
...
The class requires the following parameter in leila.ini:


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> samples
          Contains the examples
 
Constructor Summary
Headquarters()
          Creates a relation from the file given by the parameter "headquartersFile" in leila.ini
Headquarters(java.lang.String f)
          Initializes the headquarters relation from the example pair file
 
Method Summary
 Relation.WordPairType assess(LinkageWord w1, LinkageWord w2)
          Tells whether this pair is an example, a counterexample or a candidate
static void main(java.lang.String[] args)
          Test method
 boolean possibleExample(LinkageWord w)
          Tells whether this word could be an example
 boolean requiresCounterexamples()
          returns false
 
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

samples

protected java.util.Map<java.lang.String,java.lang.String> samples
Contains the examples

Constructor Detail

Headquarters

public Headquarters(java.lang.String f)
             throws java.lang.Exception
Initializes the headquarters relation from the example pair file

Throws:
java.lang.Exception

Headquarters

public Headquarters()
             throws java.lang.Exception
Creates a relation from the file given by the parameter "headquartersFile" in leila.ini

Throws:
java.lang.Exception
Method Detail

requiresCounterexamples

public boolean requiresCounterexamples()
returns false

Overrides:
requiresCounterexamples in class Relation

assess

public Relation.WordPairType assess(LinkageWord w1,
                                    LinkageWord w2)
Tells whether this pair is an example, a counterexample or a candidate

Overrides:
assess in class Relation

possibleExample

public boolean possibleExample(LinkageWord w)
Tells whether this word could be an example

Overrides:
possibleExample in class Relation

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test method

Throws:
java.lang.Exception