edu.cmu.minorthird.text.learn
Class ConditionalSemiMarkovModel.CSMMLearner

java.lang.Object
  extended by edu.cmu.minorthird.text.learn.AnnotatorLearner
      extended by edu.cmu.minorthird.text.learn.ConditionalSemiMarkovModel.CSMMLearner
Direct Known Subclasses:
Recommended.VPSMMLearner
Enclosing class:
ConditionalSemiMarkovModel

public static class ConditionalSemiMarkovModel.CSMMLearner
extends AnnotatorLearner

A learner for ConditionalSemiMarkovModel's.


Constructor Summary
ConditionalSemiMarkovModel.CSMMLearner()
           
ConditionalSemiMarkovModel.CSMMLearner(int epochs)
           
ConditionalSemiMarkovModel.CSMMLearner(int epochs, int maxSegmentSize)
           
ConditionalSemiMarkovModel.CSMMLearner(SpanFeatureExtractor fe, OnlineBinaryClassifierLearner classifierLearner, int epochs, int maxSegSz, java.lang.String annotation)
           
ConditionalSemiMarkovModel.CSMMLearner(java.lang.String annotation)
           
ConditionalSemiMarkovModel.CSMMLearner(java.lang.String dictionaryFile, java.lang.String distanceNames, int maxSegmentSize)
           
ConditionalSemiMarkovModel.CSMMLearner(java.lang.String dictionaryFile, java.lang.String distanceNames, int epoch, int maxSegmentSize)
           
ConditionalSemiMarkovModel.CSMMLearner(java.lang.String dictionaryFile, java.lang.String distanceNames, int epochSize, int maxSegmentSize, boolean addTraining, boolean doCrossVal, java.lang.String mixFile)
           
ConditionalSemiMarkovModel.CSMMLearner(java.lang.String dictionaryFile, java.lang.String distanceNames, int epoch, int maxSegmentSize, boolean addTraining, java.lang.String mixFile)
           
ConditionalSemiMarkovModel.CSMMLearner(java.lang.String dictionaryFile, java.lang.String distanceNames, int epoch, int maxSegmentSize, java.lang.String mixFile)
           
 
Method Summary
 java.lang.String getAnnotationType()
          Get the label used for annotations produced by the learner.
 Annotator getAnnotator()
          Learning takes place here.
 int getEpochs()
           
 OnlineBinaryClassifierLearner getLearner()
           
 int getMaxSegmentSize()
           
 SpanFeatureExtractor getSpanFeatureExtractor()
          Return the span feature extractor used by this annotator.
 boolean hasNextQuery()
          Returns true if the learner has more queries to answer.
 Span nextQuery()
          Returns an Span which the learner would like labeled.
 void reset()
           
 void setAnnotationType(java.lang.String s)
          Set the label used for annotations produced by the learner.
 void setAnswer(AnnotationExample answeredQuery)
          Accept the answer to the last query.
 void setDocumentPool(java.util.Iterator<Span> documentLooper)
          Accept a pool of documents.
 void setEpochs(int newEpochs)
           
 void setLearner(OnlineBinaryClassifierLearner newLearner)
           
 void setMaxSegmentSize(int newMaxSize)
           
 void setSpanFeatureExtractor(SpanFeatureExtractor fe)
          Set the feature extractor used by this annotator.
 
Methods inherited from class edu.cmu.minorthird.text.learn.AnnotatorLearner
getAnnotationTypeHelp, getSpanFeatureExtractorHelp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionalSemiMarkovModel.CSMMLearner

public ConditionalSemiMarkovModel.CSMMLearner()

ConditionalSemiMarkovModel.CSMMLearner

public ConditionalSemiMarkovModel.CSMMLearner(int epochs)

ConditionalSemiMarkovModel.CSMMLearner

public ConditionalSemiMarkovModel.CSMMLearner(int epochs,
                                              int maxSegmentSize)

ConditionalSemiMarkovModel.CSMMLearner

public ConditionalSemiMarkovModel.CSMMLearner(java.lang.String annotation)

ConditionalSemiMarkovModel.CSMMLearner

public ConditionalSemiMarkovModel.CSMMLearner(java.lang.String dictionaryFile,
                                              java.lang.String distanceNames,
                                              int maxSegmentSize)

ConditionalSemiMarkovModel.CSMMLearner

public ConditionalSemiMarkovModel.CSMMLearner(java.lang.String dictionaryFile,
                                              java.lang.String distanceNames,
                                              int epoch,
                                              int maxSegmentSize)

ConditionalSemiMarkovModel.CSMMLearner

public ConditionalSemiMarkovModel.CSMMLearner(java.lang.String dictionaryFile,
                                              java.lang.String distanceNames,
                                              int epoch,
                                              int maxSegmentSize,
                                              java.lang.String mixFile)

ConditionalSemiMarkovModel.CSMMLearner

public ConditionalSemiMarkovModel.CSMMLearner(java.lang.String dictionaryFile,
                                              java.lang.String distanceNames,
                                              int epochSize,
                                              int maxSegmentSize,
                                              boolean addTraining,
                                              boolean doCrossVal,
                                              java.lang.String mixFile)

ConditionalSemiMarkovModel.CSMMLearner

public ConditionalSemiMarkovModel.CSMMLearner(java.lang.String dictionaryFile,
                                              java.lang.String distanceNames,
                                              int epoch,
                                              int maxSegmentSize,
                                              boolean addTraining,
                                              java.lang.String mixFile)

ConditionalSemiMarkovModel.CSMMLearner

public ConditionalSemiMarkovModel.CSMMLearner(SpanFeatureExtractor fe,
                                              OnlineBinaryClassifierLearner classifierLearner,
                                              int epochs,
                                              int maxSegSz,
                                              java.lang.String annotation)
Method Detail

getLearner

public OnlineBinaryClassifierLearner getLearner()

setLearner

public void setLearner(OnlineBinaryClassifierLearner newLearner)

getEpochs

public int getEpochs()

setEpochs

public void setEpochs(int newEpochs)

getMaxSegmentSize

public int getMaxSegmentSize()

setMaxSegmentSize

public void setMaxSegmentSize(int newMaxSize)

getSpanFeatureExtractor

public SpanFeatureExtractor getSpanFeatureExtractor()
Description copied from class: AnnotatorLearner
Return the span feature extractor used by this annotator. This could be null if no such feature extractor exists.

Specified by:
getSpanFeatureExtractor in class AnnotatorLearner

setSpanFeatureExtractor

public void setSpanFeatureExtractor(SpanFeatureExtractor fe)
Description copied from class: AnnotatorLearner
Set the feature extractor used by this annotator. This may have no action if no such feature extractor exists.

Specified by:
setSpanFeatureExtractor in class AnnotatorLearner

reset

public void reset()
Specified by:
reset in class AnnotatorLearner

setDocumentPool

public void setDocumentPool(java.util.Iterator<Span> documentLooper)
Description copied from class: AnnotatorLearner
Accept a pool of documents.

Specified by:
setDocumentPool in class AnnotatorLearner

hasNextQuery

public boolean hasNextQuery()
Description copied from class: AnnotatorLearner
Returns true if the learner has more queries to answer.

Specified by:
hasNextQuery in class AnnotatorLearner

nextQuery

public Span nextQuery()
Description copied from class: AnnotatorLearner
Returns an Span which the learner would like labeled.

Specified by:
nextQuery in class AnnotatorLearner

setAnswer

public void setAnswer(AnnotationExample answeredQuery)
Description copied from class: AnnotatorLearner
Accept the answer to the last query.

Specified by:
setAnswer in class AnnotatorLearner

setAnnotationType

public void setAnnotationType(java.lang.String s)
Description copied from class: AnnotatorLearner
Set the label used for annotations produced by the learner.

Specified by:
setAnnotationType in class AnnotatorLearner

getAnnotationType

public java.lang.String getAnnotationType()
Description copied from class: AnnotatorLearner
Get the label used for annotations produced by the learner.

Specified by:
getAnnotationType in class AnnotatorLearner

getAnnotator

public Annotator getAnnotator()
Learning takes place here.

Specified by:
getAnnotator in class AnnotatorLearner