edu.washington.cs.knowitall.rule
Class Annotation
java.lang.Object
edu.washington.cs.knowitall.rule.Annotation
public class Annotation
- extends Object
Representation of an annotation of an extraction that expresses an
ontological relation that can be mapped from the associated sentence.
- Author:
- schmmd
relation
public final OntologicalRelation relation
positive
public final boolean positive
sentence
public final Sentence sentence
Annotation
public Annotation(Sentence sentence,
boolean positive,
OntologicalRelation relation)
toString
public String toString()
- Overrides:
toString in class Object
extractions
public Iterable<RelationExtraction> extractions()
toOntologicalRelations
public static Iterable<OntologicalRelation> toOntologicalRelations(Iterable<Annotation> annotations)
findSentence
public static Sentence findSentence(Collection<Sentence> sentences,
String sentenceText)
throws IOException
- Find the sentence with text equal to sentenceText.
- Parameters:
sentences - sentences to search oversentenceText - text to search for
- Returns:
-
- Throws:
IOException
findSentence
public static Sentence findSentence(List<Sentence> sentences,
long sentenceId)
- Find the sentence with id equal to sentenceId.
- Parameters:
sentences - sentences to search oversentenceId - id to search for
- Returns:
toXmlElement
public org.jdom.Element toXmlElement()
fromXmlElement
public static Annotation fromXmlElement(Sentence sentence,
org.jdom.Element e)
Copyright © 2011 University of Washington CSE. All Rights Reserved.