edu.cmu.minorthird.text.learn
Class AnnotatorLearner

java.lang.Object
  extended by edu.cmu.minorthird.text.learn.AnnotatorLearner
Direct Known Subclasses:
AbstractBatchAnnotatorLearner, ConditionalSemiMarkovModel.CSMMLearner, SegmentAnnotatorLearner

public abstract class AnnotatorLearner
extends java.lang.Object

Learn an Annotator from AnnotationExample's.

Author:
William Cohen

Constructor Summary
AnnotatorLearner()
           
 
Method Summary
abstract  java.lang.String getAnnotationType()
          Get the label used for annotations produced by the learner.
 java.lang.String getAnnotationTypeHelp()
           
abstract  Annotator getAnnotator()
          Return the learned annotator
abstract  SpanFeatureExtractor getSpanFeatureExtractor()
          Return the span feature extractor used by this annotator.
 java.lang.String getSpanFeatureExtractorHelp()
           
abstract  boolean hasNextQuery()
          Returns true if the learner has more queries to answer.
abstract  Span nextQuery()
          Returns an Span which the learner would like labeled.
abstract  void reset()
           
abstract  void setAnnotationType(java.lang.String s)
          Set the label used for annotations produced by the learner.
abstract  void setAnswer(AnnotationExample answeredQuery)
          Accept the answer to the last query.
abstract  void setDocumentPool(java.util.Iterator<Span> documents)
          Accept a pool of documents.
abstract  void setSpanFeatureExtractor(SpanFeatureExtractor fe)
          Set the feature extractor used by this annotator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatorLearner

public AnnotatorLearner()
Method Detail

reset

public abstract void reset()

setDocumentPool

public abstract void setDocumentPool(java.util.Iterator<Span> documents)
Accept a pool of documents.


hasNextQuery

public abstract boolean hasNextQuery()
Returns true if the learner has more queries to answer.


nextQuery

public abstract Span nextQuery()
Returns an Span which the learner would like labeled.


setAnswer

public abstract void setAnswer(AnnotationExample answeredQuery)
Accept the answer to the last query.


setAnnotationType

public abstract void setAnnotationType(java.lang.String s)
Set the label used for annotations produced by the learner.


getAnnotationType

public abstract java.lang.String getAnnotationType()
Get the label used for annotations produced by the learner.


getAnnotator

public abstract Annotator getAnnotator()
Return the learned annotator


getSpanFeatureExtractor

public abstract SpanFeatureExtractor getSpanFeatureExtractor()
Return the span feature extractor used by this annotator. This could be null if no such feature extractor exists.


setSpanFeatureExtractor

public abstract void setSpanFeatureExtractor(SpanFeatureExtractor fe)
Set the feature extractor used by this annotator. This may have no action if no such feature extractor exists.


getAnnotationTypeHelp

public java.lang.String getAnnotationTypeHelp()

getSpanFeatureExtractorHelp

public java.lang.String getSpanFeatureExtractorHelp()