edu.washington.cs.knowitall.rule
Class Annotation

java.lang.Object
  extended by 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

Field Summary
 boolean positive
           
 OntologicalRelation relation
           
 Sentence sentence
           
 
Constructor Summary
Annotation(Sentence sentence, boolean positive, OntologicalRelation relation)
           
 
Method Summary
 Iterable<RelationExtraction> extractions()
           
static Sentence findSentence(Collection<Sentence> sentences, String sentenceText)
          Find the sentence with text equal to sentenceText.
static Sentence findSentence(List<Sentence> sentences, long sentenceId)
          Find the sentence with id equal to sentenceId.
static Annotation fromXmlElement(Sentence sentence, org.jdom.Element e)
           
static Iterable<OntologicalRelation> toOntologicalRelations(Iterable<Annotation> annotations)
           
 String toString()
           
 org.jdom.Element toXmlElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

relation

public final OntologicalRelation relation

positive

public final boolean positive

sentence

public final Sentence sentence
Constructor Detail

Annotation

public Annotation(Sentence sentence,
                  boolean positive,
                  OntologicalRelation relation)
Method Detail

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 over
sentenceText - 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 over
sentenceId - 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.