public abstract class AbstractTrainer extends Object implements Trainer
| Constructor and Description |
|---|
AbstractTrainer(opennlp.tools.util.TrainingParameters params)
Construct a trainer with training and test data, and with options for
language, beamsize for decoding, sequence codec and corpus format (conll or opennlp).
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBeamSize() |
String |
getLanguage()
Get the language.
|
opennlp.tools.namefind.TokenNameFinderFactory |
getNameClassifierFactory()
Get the features which are implemented in each of the trainers extending
this class.
|
static opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> |
getNameStream(String inputData,
String clearFeatures,
String aCorpusFormat)
Getting the stream with the right corpus format.
|
String |
getSequenceCodec()
Get the Sequence codec.
|
void |
setLanguage(String aLang)
Set the language.
|
opennlp.tools.namefind.TokenNameFinderFactory |
setNameClassifierFactory(opennlp.tools.namefind.TokenNameFinderFactory tokenNameFinderFactory) |
void |
setSequenceCodec(String aSeqCodec)
Set the sequence codec.
|
opennlp.tools.namefind.TokenNameFinderModel |
train(opennlp.tools.util.TrainingParameters params)
Generate
TokenNameFinderModel models. |
public AbstractTrainer(opennlp.tools.util.TrainingParameters params)
throws IOException
params - the training parametersIOException - io exceptionpublic final opennlp.tools.namefind.TokenNameFinderModel train(opennlp.tools.util.TrainingParameters params)
TrainerTokenNameFinderModel models.public static opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> getNameStream(String inputData, String clearFeatures, String aCorpusFormat) throws IOException
inputData - the input dataclearFeatures - clear the featuresaCorpusFormat - the corpus formatIOException - the io exceptionpublic final opennlp.tools.namefind.TokenNameFinderFactory getNameClassifierFactory()
public final opennlp.tools.namefind.TokenNameFinderFactory setNameClassifierFactory(opennlp.tools.namefind.TokenNameFinderFactory tokenNameFinderFactory)
public final String getLanguage()
public final void setLanguage(String aLang)
aLang - the languagepublic final String getSequenceCodec()
public final void setSequenceCodec(String aSeqCodec)
aSeqCodec - the sequence codec to be setpublic final int getBeamSize()
Copyright © 2015 IXA pipes. All rights reserved.