public class DocumentClassifierTrainer extends Object
| Constructor and Description |
|---|
DocumentClassifierTrainer(opennlp.tools.util.TrainingParameters params)
Construct a trainer with training and test data and language options.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createDocumentClassificationFactory(opennlp.tools.util.TrainingParameters params)
Create
createDocumentClassificationFactory . |
DocumentClassifierFactory |
getDocumentClassificationFactory()
Get the features which are implemented in each of the trainers extending
this class.
|
static opennlp.tools.util.ObjectStream<DocSample> |
getDocumentStream(String inputData,
String clearFeatures)
Getting the stream with the right corpus format.
|
DocumentClassifierFactory |
setDocumentClassifierFactory(DocumentClassifierFactory tokenNameFinderFactory) |
DocumentClassifierModel |
train(opennlp.tools.util.TrainingParameters params) |
public DocumentClassifierTrainer(opennlp.tools.util.TrainingParameters params)
throws IOException
params - the training parametersIOException - io exceptionpublic void createDocumentClassificationFactory(opennlp.tools.util.TrainingParameters params)
throws IOException
createDocumentClassificationFactory .params - the parameter training fileIOException - if io errorpublic final DocumentClassifierModel train(opennlp.tools.util.TrainingParameters params)
public static opennlp.tools.util.ObjectStream<DocSample> getDocumentStream(String inputData, String clearFeatures) throws IOException
inputData - the input dataclearFeatures - whether to reset the features for each documentIOException - the io exceptionpublic final DocumentClassifierFactory getDocumentClassificationFactory()
public final DocumentClassifierFactory setDocumentClassifierFactory(DocumentClassifierFactory tokenNameFinderFactory)
Copyright © 2017 IXA pipes. All rights reserved.