|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.minorthird.text.learn.AnnotatorLearner
edu.cmu.minorthird.text.learn.SegmentAnnotatorLearner
public class SegmentAnnotatorLearner
Learn an annotation model using a SegmentDataset dataset and a BatchSequenceClassifierLearner.
| Nested Class Summary | |
|---|---|
static class |
SegmentAnnotatorLearner.SegmentAnnotator
|
| Field Summary | |
|---|---|
protected java.lang.String |
annotationType
|
protected SegmentDataset |
dataset
|
protected SpanFeatureExtractor |
fe
|
protected BatchSegmenterLearner |
learner
|
protected int |
maxWindowSize
|
| Constructor Summary | |
|---|---|
SegmentAnnotatorLearner()
|
|
SegmentAnnotatorLearner(BatchSegmenterLearner learner,
SpanFeatureExtractor fe)
|
|
SegmentAnnotatorLearner(BatchSegmenterLearner learner,
SpanFeatureExtractor fe,
int windowSize)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAnnotationType()
Get the label used for annotations produced by the learner. |
Annotator |
getAnnotator()
Return the learned annotator. |
boolean |
getCompressDataset()
If set, try and compress the data. |
java.lang.String |
getCompressDatasetHelp()
|
boolean |
getDisplayDatasetBeforeLearning()
If set, try and pop up an interactive viewer of the sequential dataset before learning. |
java.lang.String |
getDisplayDatasetBeforeLearningHelp()
|
int |
getHistorySize()
|
BatchSegmenterLearner |
getSemiMarkovLearner()
|
java.lang.String |
getSemiMarkovLearnerHelp()
|
SpanFeatureExtractor |
getSpanFeatureExtractor()
Return the span feature extractor used by this annotator. |
boolean |
hasNextQuery()
Ask for labels on every document. |
Span |
nextQuery()
Return the next unlabeled document. |
void |
reset()
|
void |
setAnnotationType(java.lang.String s)
Specify the type of annotation produced by this annotator - that is, the type associated with spans produced by it. |
void |
setAnswer(AnnotationExample answeredQuery)
Accept the answer to the last query. |
void |
setCompressDataset(boolean flag)
|
void |
setDisplayDatasetBeforeLearning(boolean newDisplayDatasetBeforeLearning)
|
void |
setDocumentPool(java.util.Iterator<Span> documentLooper)
Accept the pool of unlabeled documents. |
void |
setSemiMarkovLearner(BatchSegmenterLearner learner)
|
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 |
| Field Detail |
|---|
protected java.lang.String annotationType
protected SegmentDataset dataset
protected BatchSegmenterLearner learner
protected SpanFeatureExtractor fe
protected int maxWindowSize
| Constructor Detail |
|---|
public SegmentAnnotatorLearner()
public SegmentAnnotatorLearner(BatchSegmenterLearner learner,
SpanFeatureExtractor fe)
public SegmentAnnotatorLearner(BatchSegmenterLearner learner,
SpanFeatureExtractor fe,
int windowSize)
| Method Detail |
|---|
public void reset()
reset in class AnnotatorLearnerpublic boolean getDisplayDatasetBeforeLearning()
public void setDisplayDatasetBeforeLearning(boolean newDisplayDatasetBeforeLearning)
public java.lang.String getDisplayDatasetBeforeLearningHelp()
public boolean getCompressDataset()
public void setCompressDataset(boolean flag)
public java.lang.String getCompressDatasetHelp()
public int getHistorySize()
public BatchSegmenterLearner getSemiMarkovLearner()
public void setSemiMarkovLearner(BatchSegmenterLearner learner)
public java.lang.String getSemiMarkovLearnerHelp()
public SpanFeatureExtractor getSpanFeatureExtractor()
AnnotatorLearner
getSpanFeatureExtractor in class AnnotatorLearnerpublic void setSpanFeatureExtractor(SpanFeatureExtractor fe)
AnnotatorLearner
setSpanFeatureExtractor in class AnnotatorLearnerpublic void setAnnotationType(java.lang.String s)
setAnnotationType in class AnnotatorLearnerpublic java.lang.String getAnnotationType()
AnnotatorLearner
getAnnotationType in class AnnotatorLearnerpublic void setDocumentPool(java.util.Iterator<Span> documentLooper)
setDocumentPool in class AnnotatorLearnerpublic boolean hasNextQuery()
hasNextQuery in class AnnotatorLearnerpublic Span nextQuery()
nextQuery in class AnnotatorLearnerpublic void setAnswer(AnnotationExample answeredQuery)
setAnswer in class AnnotatorLearnerpublic Annotator getAnnotator()
getAnnotator in class AnnotatorLearner
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||