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 String |
PARAM_IMPORT_MODEL_FILE
Name of the parameter for the model import path
|
static String |
PARAM_INPUT_VIEW
Name of the parameter for the input view
|
static String |
PARAM_SENTENCE
Name of the parameter for the annotation type which covers token annotations
|
static 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(String filename)
Reads a saved
MODEL object from a file |
static org.apache.uima.cas.Type |
getType(org.apache.uima.jcas.JCas aJCas,
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, process
getCasInstancesRequired, hasNext, next
public static String PARAM_INPUT_VIEW
public static String PARAM_IMPORT_MODEL_FILE
public static String PARAM_SENTENCE
public static 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.AnalysisComponent
initialize
in interface Tagger
initialize
in class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.resource.ResourceInitializationException
AnalysisComponent_ImplBase.initialize(UimaContext)
public static ModelGeneration get_model(String filename)
MODEL
object from a filefilename
- model fileModelGeneration
public 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, String annotationString) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
aJCas
- annotationString
- org.apache.uima.analysis_engine.AnalysisEngineProcessException
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.