public abstract class AbstractTaggerTrainer extends Object implements TaggerTrainer
| Constructor and Description |
|---|
AbstractTaggerTrainer(opennlp.tools.util.TrainingParameters params)
Construct an AbstractTrainer.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createAutomaticDictionary(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> aDictSamples,
int aDictCutOff)
Automatically create a tag dictionary from training data.
|
protected opennlp.tools.dictionary.Dictionary |
createNgramDictionary(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> aDictSamples,
int aNgramCutoff)
Create ngram dictionary from training data.
|
protected void |
createTagDictionary(String dictPath)
Create a tag dictionary with the dictionary contained in the dictPath.
|
protected Integer |
getDictCutOff()
Get the cutoff to create automatic dictionary from training data.
|
protected MorphoSampleStream |
getDictSamples()
Get the dictSamples to automatically create tag dictionary.
|
protected Integer |
getNgramDictCutOff()
Get the cutoff to create automatic ngram dictionary from training data.
|
protected opennlp.tools.postag.POSTaggerFactory |
getPosTaggerFactory()
Get the posTaggerFactory.
|
protected void |
setDictSamples(MorphoSampleStream aDictSamples)
Set the dictSamples to automatically create tag dictionary.
|
protected void |
setPosTaggerFactory(opennlp.tools.postag.POSTaggerFactory aPosTaggerFactory)
Set/implement the posTaggerFactory to be used in the pos tagger training.
|
opennlp.tools.postag.POSModel |
train(opennlp.tools.util.TrainingParameters params)
Train a pos model with a parameters file.
|
public AbstractTaggerTrainer(opennlp.tools.util.TrainingParameters params)
throws IOException
params - the training parametersIOException - the io exceptionspublic final opennlp.tools.postag.POSModel train(opennlp.tools.util.TrainingParameters params)
TaggerTrainertrain in interface TaggerTrainerparams - the parameters filePOSModel trainedprotected final void createTagDictionary(String dictPath)
dictPath - the string pointing to the tag dictionaryprotected final void createAutomaticDictionary(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> aDictSamples,
int aDictCutOff)
aDictSamples - the dictSamples created from training dataaDictCutOff - the cutoff to create the dictionaryprotected final opennlp.tools.dictionary.Dictionary createNgramDictionary(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> aDictSamples,
int aNgramCutoff)
aDictSamples - the training dataaNgramCutoff - the cutoffprotected final MorphoSampleStream getDictSamples()
protected final void setDictSamples(MorphoSampleStream aDictSamples)
aDictSamples - the dict samples as a MorphoSampleStreamprotected final opennlp.tools.postag.POSTaggerFactory getPosTaggerFactory()
protected final void setPosTaggerFactory(opennlp.tools.postag.POSTaggerFactory aPosTaggerFactory)
aPosTaggerFactory - the pos tagger factory implementedprotected final Integer getDictCutOff()
protected final Integer getNgramDictCutOff()
Copyright © 2016 IXA pipes. All rights reserved.