|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJet.HMM.HMMannotator
HMMAnnotator provides methods for training and using HMMs with annotated Documents.
Constructor Summary | |
HMMannotator(Jet.Chunk.TokenClassifier h)
create a new annotator based on HMM h. |
Method Summary | |
void |
annotate(Document doc)
use the HMM to add annotations to Document 'doc'. |
void |
annotateSpan(Document doc,
Span textSpan)
use the HMM to add annotations to Span 'textSpan' of Document 'doc'. |
java.lang.String[][] |
getTagTable()
returns the tag table (the correspondence between HMM tags and annotation types and features). |
void |
readTagTable(java.io.BufferedReader in)
read the tag table (the list of annotation types and features) from BufferedReader 'in'. |
void |
readTagTable(java.lang.String tagFileName)
read the tag table (the list of annotation types and features) from file 'tagFileName'. |
void |
setAnnotateEachToken(boolean flag)
sets / clears the annotateEachToken flag, which applies only if BItag == false. |
void |
setBItag(boolean flag)
sets / clears the BItag flag. |
void |
setRecordMargin(boolean recordMargin)
turn on/off the feature that records the margin associated with an annotation as a feature 'margin' on the annotation. |
void |
setTagTable(java.lang.String[][] table)
define the tag table for the annotator -- the correspondence between the tags associated with the states and the annotations on the documents. |
void |
setTrace(boolean trace)
turn on / off the trace |
void |
setZoneToTag(java.lang.String zone)
sets the zones to be annotated. |
void |
train(Document doc)
use the annotations on Document 'doc' to train the HMM. |
void |
train(DocumentCollection col)
use the annotations on all documents in DocumentCollection 'col' to train HMM 'h'. |
void |
trainOnSpan(Document doc,
Span textSpan)
use the annotations on Span 'span' of Document 'doc' to train the HMM. |
void |
writeTagTable(java.io.PrintWriter pw)
writes the tag table (the correspondence between HMM tags and annotation types and features) to PrintWriter 'pw'. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HMMannotator(Jet.Chunk.TokenClassifier h)
Method Detail |
public void setTagTable(java.lang.String[][] table)
public void readTagTable(java.lang.String tagFileName)
public void readTagTable(java.io.BufferedReader in)
public void writeTagTable(java.io.PrintWriter pw)
public java.lang.String[][] getTagTable()
public void setBItag(boolean flag)
public void setAnnotateEachToken(boolean flag)
public void setZoneToTag(java.lang.String zone)
public void setTrace(boolean trace)
public void setRecordMargin(boolean recordMargin)
public void train(Document doc)
public void trainOnSpan(Document doc, Span textSpan)
public void train(DocumentCollection col)
public void annotate(Document doc)
public void annotateSpan(Document doc, Span textSpan)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |