edu.cmu.minorthird.text.learn
Class TextLabelsAnnotatorTeacher

java.lang.Object
  extended by edu.cmu.minorthird.text.learn.AnnotatorTeacher
      extended by edu.cmu.minorthird.text.learn.TextLabelsAnnotatorTeacher

public class TextLabelsAnnotatorTeacher
extends AnnotatorTeacher

Train an AnnotationExample from a previously annotated corpus (stored in a TextLabels).

Author:
William Cohen

Constructor Summary
TextLabelsAnnotatorTeacher(TextLabels labels, java.lang.String userLabelType)
           
TextLabelsAnnotatorTeacher(TextLabels labels, java.lang.String userLabelType, java.lang.String userLabelProp)
           
 
Method Summary
 TextLabels availableLabels()
          Labels available for training, testing
 java.util.Iterator<Span> documentPool()
          Unlabeled instances.
 boolean hasAnswers()
          Return true if this teacher can answer more queries.
 AnnotationExample labelInstance(Span query)
          Label an Span queried by the learner.
 
Methods inherited from class edu.cmu.minorthird.text.learn.AnnotatorTeacher
train
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextLabelsAnnotatorTeacher

public TextLabelsAnnotatorTeacher(TextLabels labels,
                                  java.lang.String userLabelType)

TextLabelsAnnotatorTeacher

public TextLabelsAnnotatorTeacher(TextLabels labels,
                                  java.lang.String userLabelType,
                                  java.lang.String userLabelProp)
Method Detail

documentPool

public java.util.Iterator<Span> documentPool()
Description copied from class: AnnotatorTeacher
Unlabeled instances.

Specified by:
documentPool in class AnnotatorTeacher

labelInstance

public AnnotationExample labelInstance(Span query)
Description copied from class: AnnotatorTeacher
Label an Span queried by the learner. Return null if the query can't be answered, otherwise return an AnnotationExample.

Specified by:
labelInstance in class AnnotatorTeacher

hasAnswers

public boolean hasAnswers()
Description copied from class: AnnotatorTeacher
Return true if this teacher can answer more queries.

Specified by:
hasAnswers in class AnnotatorTeacher

availableLabels

public TextLabels availableLabels()
Description copied from class: AnnotatorTeacher
Labels available for training, testing

Specified by:
availableLabels in class AnnotatorTeacher