edu.washington.cs.knowitall.rule.confidence
Class ConfidenceFunction<E extends Comparable<E>>

java.lang.Object
  extended by edu.washington.cs.knowitall.rule.confidence.ConfidenceFunction<E>
All Implemented Interfaces:
com.google.common.base.Function<Rule,E>
Direct Known Subclasses:
FnConfidenceFunction, PrecisionRecallConfidenceFunction

public abstract class ConfidenceFunction<E extends Comparable<E>>
extends Object
implements com.google.common.base.Function<Rule,E>


Field Summary
protected  int annotationCount
           
 com.google.common.collect.ImmutableList<AnnotatedSentence> annotations
           
protected  OntologicalRelationMatcher matcher
           
protected  Map<Rule,Results> results
          Used for improving the speed of computations.
 
Constructor Summary
ConfidenceFunction(List<AnnotatedSentence> annotations)
           
ConfidenceFunction(List<AnnotatedSentence> annotations, OntologicalRelationMatcher matcher)
           
 
Method Summary
 E apply(Collection<Rule> rules)
           
 E apply(Iterable<Rule> rules, int size)
           
 double apply(OntologicalRelation relation)
           
abstract  E apply(Rule rule)
           
 Rank<E> createRank(Rule rule)
           
 OntologicalRelation match(OntologicalRelation mappedRelation)
           
 int numberAnnotationsCorrect(Rule rule)
           
 Iterable<Rank<E>> reduce(Iterable<Rank<E>> ranks, Map<Rule,Results> results)
           
 Set<OntologicalRelation> relations(Iterable<Rule> rules)
           
 void relations(Rule rule, Set<OntologicalRelation> correct, Set<OntologicalRelation> error)
           
 Map<Rule,Results> results(Iterable<Rule> rules)
           
 Results results(Rule rule)
           
 void setResults(Map<Rule,Results> results)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Field Detail

matcher

protected final OntologicalRelationMatcher matcher

annotations

public final com.google.common.collect.ImmutableList<AnnotatedSentence> annotations

annotationCount

protected final int annotationCount

results

protected Map<Rule,Results> results
Used for improving the speed of computations.

Constructor Detail

ConfidenceFunction

public ConfidenceFunction(List<AnnotatedSentence> annotations,
                          OntologicalRelationMatcher matcher)

ConfidenceFunction

public ConfidenceFunction(List<AnnotatedSentence> annotations)
Method Detail

setResults

public void setResults(Map<Rule,Results> results)

numberAnnotationsCorrect

public int numberAnnotationsCorrect(Rule rule)

apply

public abstract E apply(Rule rule)
Specified by:
apply in interface com.google.common.base.Function<Rule,E extends Comparable<E>>

apply

public E apply(Collection<Rule> rules)

apply

public E apply(Iterable<Rule> rules,
               int size)

apply

public double apply(OntologicalRelation relation)

match

public OntologicalRelation match(OntologicalRelation mappedRelation)

relations

public Set<OntologicalRelation> relations(Iterable<Rule> rules)

relations

public void relations(Rule rule,
                      Set<OntologicalRelation> correct,
                      Set<OntologicalRelation> error)

createRank

public Rank<E> createRank(Rule rule)

results

public Results results(Rule rule)

results

public Map<Rule,Results> results(Iterable<Rule> rules)

reduce

public Iterable<Rank<E>> reduce(Iterable<Rank<E>> ranks,
                                Map<Rule,Results> results)


Copyright © 2011 University of Washington CSE. All Rights Reserved.