public class HMMTagger extends org.apache.uima.analysis_component.JCasAnnotator_ImplBase implements Tagger
| Modifier and Type | Field and Description |
|---|---|
ModelGeneration |
my_model |
int |
N
for a bigram model: N = 2, for a trigram model N=3 N is defined in parameter file
|
static java.lang.String |
PARAM_IMPORT_MODEL_FILE
Name of the parameter for the model import path
|
static java.lang.String |
PARAM_INPUT_VIEW
Name of the parameter for the input view
|
static java.lang.String |
PARAM_SENTENCE
Name of the parameter for the annotation type which covers token annotations
|
static java.lang.String |
PARAM_TOKEN_FP
Name of the parameter for the feature path to the token feature to be tagged
|
| Constructor and Description |
|---|
HMMTagger() |
| Modifier and Type | Method and Description |
|---|---|
static ModelGeneration |
get_model(java.lang.String filename)
Reads a saved
MODEL object from a file |
static org.apache.uima.cas.Type |
getType(org.apache.uima.jcas.JCas aJCas,
java.lang.String annotationString)
Get the type of a given annotation name and check if it exists
|
void |
initialize(org.apache.uima.UimaContext aContext)
Initialize the Annotator.
|
void |
process(org.apache.uima.jcas.JCas aJCas)
Process a CAS.
|
getRequiredCasInterface, processgetCasInstancesRequired, hasNext, nextpublic static java.lang.String PARAM_INPUT_VIEW
public static java.lang.String PARAM_IMPORT_MODEL_FILE
public static java.lang.String PARAM_SENTENCE
public static java.lang.String PARAM_TOKEN_FP
public int N
public ModelGeneration my_model
public void initialize(org.apache.uima.UimaContext aContext)
throws org.apache.uima.resource.ResourceInitializationException
initialize in interface org.apache.uima.analysis_component.AnalysisComponentinitialize in interface Taggerinitialize in class org.apache.uima.analysis_component.AnalysisComponent_ImplBaseorg.apache.uima.resource.ResourceInitializationExceptionAnalysisComponent_ImplBase.initialize(UimaContext)public static ModelGeneration get_model(java.lang.String filename)
MODEL object from a filefilename - model fileModelGenerationpublic void process(org.apache.uima.jcas.JCas aJCas)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
public static org.apache.uima.cas.Type getType(org.apache.uima.jcas.JCas aJCas,
java.lang.String annotationString)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
aJCas - annotationString - org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionCopyright © 2013. All Rights Reserved.