|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object leila.algorithm.Pair
public class Pair
This class is part of LEILA. The author Fabian M. Suchanek reserves all rights to the class. You may use this class if (1) it is not for commercial purposes, (2) you give credit to the author and (3) you use the class at your own risk. If you use the class for scientific purposes, please cite our paper "Combining Linguistic and Statistical Analysis to Extract Relations from Web Documents" (pdf, ppt, bib).
Pair.java stores a pair of words.
Field Summary | |
---|---|
java.lang.String |
comment
Holds comment |
double |
confidence
Holds the confidence that this pair is a valid pair |
static NumberFormatter |
formy
Holds the formatter |
java.lang.String |
word1
Holds the first word |
java.lang.String |
word2
Holds the second word |
Constructor Summary | |
---|---|
Pair(LinkageWord w1,
LinkageWord w2,
double c)
Creates a new pair from two words and a confidence |
|
Pair(LinkageWord w1,
LinkageWord w2,
double c,
java.lang.String com)
Creates a new pair from two words, a confidence and a comment |
|
Pair(java.lang.String w1,
java.lang.String w2)
Creates a new pair from two words |
|
Pair(java.lang.String f,
java.lang.String s,
double c,
java.lang.String fi)
Creates a new pair from two words, a confidence and a comment |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares by confidence |
boolean |
equals(java.lang.Object o)
Tells if both words are strequal |
int |
hashCode()
Returns the sum of the word hashcodes |
static void |
main(java.lang.String[] args)
Test routine |
static boolean |
strequal(java.lang.String s1,
java.lang.String s2)
Returns true, if every component of the shorter String appears as a component in the longer one |
java.lang.String |
toString()
Returns " |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.lang.String word1
public java.lang.String word2
public double confidence
public java.lang.String comment
public static NumberFormatter formy
Constructor Detail |
---|
public Pair(java.lang.String f, java.lang.String s, double c, java.lang.String fi)
public Pair(LinkageWord w1, LinkageWord w2, double c, java.lang.String com)
public Pair(LinkageWord w1, LinkageWord w2, double c)
public Pair(java.lang.String w1, java.lang.String w2)
Method Detail |
---|
public static boolean strequal(java.lang.String s1, java.lang.String s2)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |