edu.washington.cs.knowitall.rule.learn
Class RuleLearner<E extends Comparable<E>>
java.lang.Object
edu.washington.cs.knowitall.rule.learn.Learner<E>
edu.washington.cs.knowitall.rule.learn.RuleLearner<E>
- Direct Known Subclasses:
- BeamSearchRuleLearner, MostGeneralRuleLearner
public abstract class RuleLearner<E extends Comparable<E>>
- extends Learner<E>
Rule learning framework for mapping extractions onto an ontology. Annotations
of rule instances are supplied, as well as corresponding extractions. For
each annotation, a base rule is created by making a maximally constrained
rule that results in the ontological relation given the extraction. Then the
base rule is generalized using a search algorithm, by default beam search. A
list of generalized rules are returned. There may be more than one value in
the case of a tie.
- Author:
- schmmd
| Methods inherited from class edu.washington.cs.knowitall.rule.learn.Learner |
generalize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RuleLearner
public RuleLearner(BaseRuleFactory factory,
RuleValidator validator,
ConfidenceFunction<E> confidence)
learn
public List<Rank<E>> learn(Iterable<Annotation> annotations)
learn
public List<Rank<E>> learn(Annotation annotation)
- Generalize rules from the base rule created from the supplied annotation.
- Parameters:
annotation - from which to create the base rule.
- Returns:
search
public abstract List<Rank<E>> search(Rule rule)
filterBest
public List<Rank<E>> filterBest(Iterable<Rank<E>> rules)
filterBestRules
public List<Rank<E>> filterBestRules(Collection<Rule> rules)
printRuleExtractions
public static void printRuleExtractions(Rule rule,
ConfidenceFunction<?> confidence)
printMissedRelations
public static void printMissedRelations(List<Rule> rules,
ConfidenceFunction<?> confidence)
printRuleDerivation
public static void printRuleDerivation(Rule rule)
printRuleDerivation
public static void printRuleDerivation(Rule rule,
ConfidenceFunction<?> conf)
main
public static void main(String[] args)
throws org.jdom.JDOMException,
IOException
- Throws:
org.jdom.JDOMException
IOException
Copyright © 2011 University of Washington CSE. All Rights Reserved.