|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.ie.Confidence
Meant to serve as a parallel structure to the KAON Instance
.
Confidence ratings are specifically used when two potentially compatible
Instances are merged together but contain conflicting information --
if the confidence rating for field A is high in Instance X but low
in Instance Y, then one might choose to use X's version of A over Y's.
To use a Confidence object, initialize it when the Instance is created. Confidence ratings for individual fields can be set by refering to the relation or the relation name. In addition, two global metrics per Confidence are supported -- a penalty and a global ranking -- neither of which are field-specific. The penalty can be used to keep track of things like field conflicts, while the overall ranking can keep track of search rank, for example. The paradigm is set up such that the overall "score" of a Confidence object (which is the overall score of the corresponding Instance) is the sum of the confidence rankings for each field, plus the global ranking, minus the penalty.
Constructor Summary | |
Confidence(edu.unika.aifb.kaon.Instance i)
Creates a Confidence object based on the Instance passed in. |
Method Summary | |
double |
getConfidence(edu.unika.aifb.kaon.Relation r)
Returns the confidence ranking for the particular field. |
double |
getConfidence(String relationName)
Returns the confidence ranking for the particular field. |
double |
getConfidenceSum()
Returns the sum of getConfidence called on all relations. |
double |
getGlobalRanking()
The Confidence object can store an additional global confidence ranking, as decided by the merging functionality. |
double |
getPenalty()
Similar to the global ranking, the penalty can be another piece of information relevant to the entire Instance rather than a particular field. |
void |
setConfidence(edu.unika.aifb.kaon.Relation r,
double ranking)
Set the confidence ranking for a field, specified by Relation. |
void |
setConfidence(String relationName,
double ranking)
Set the confidence ranking for a field, specified by Relation. |
void |
setGlobalRanking(double ranking)
Sets the global confidence ranking field. |
void |
setPenalty(double p)
Sets the penalty field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Confidence(edu.unika.aifb.kaon.Instance i) throws org.w3c.rdf.model.ModelException, edu.unika.aifb.sitris.exception.NotSupportedException
Method Detail |
public void setConfidence(edu.unika.aifb.kaon.Relation r, double ranking)
r
- the Relation corresponding to the field that was filled
in the parallel Instanceranking
- the confidence rankingpublic void setConfidence(String relationName, double ranking)
relationName
- the Relation corresponding to the field that
was filled in the parallel Instanceranking
- the confidence rankingpublic double getConfidence(edu.unika.aifb.kaon.Relation r)
r
- the Relation to get the confidence value for
public double getConfidence(String relationName)
relationName
- the English name of the relation to get
the confidence value for
public double getConfidenceSum()
public double getGlobalRanking()
setGlobalRanking
.
public void setGlobalRanking(double ranking)
ranking
- the value to set the overall confidence ranking topublic double getPenalty()
public void setPenalty(double p)
p
- the value to set the penalty to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |