Package opennlp.tools.namefind
Class TokenNameFinderCrossValidator
- java.lang.Object
-
- opennlp.tools.namefind.TokenNameFinderCrossValidator
-
public class TokenNameFinderCrossValidator extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TokenNameFinderCrossValidator(java.lang.String languageCode, java.lang.String type, TrainingParameters trainParams, byte[] featureGeneratorBytes, java.util.Map<java.lang.String,java.lang.Object> resources, TokenNameFinderEvaluationMonitor... listeners)
TokenNameFinderCrossValidator(java.lang.String languageCode, java.lang.String type, TrainingParameters trainParams, byte[] featureGeneratorBytes, java.util.Map<java.lang.String,java.lang.Object> resources, SequenceCodec<java.lang.String> codec, TokenNameFinderEvaluationMonitor... listeners)
Name finder cross validatorTokenNameFinderCrossValidator(java.lang.String languageCode, java.lang.String type, TrainingParameters trainParams, TokenNameFinderFactory factory, TokenNameFinderEvaluationMonitor... listeners)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
evaluate(ObjectStream<NameSample> samples, int nFolds)
Starts the evaluation.FMeasure
getFMeasure()
-
-
-
Constructor Detail
-
TokenNameFinderCrossValidator
public TokenNameFinderCrossValidator(java.lang.String languageCode, java.lang.String type, TrainingParameters trainParams, byte[] featureGeneratorBytes, java.util.Map<java.lang.String,java.lang.Object> resources, SequenceCodec<java.lang.String> codec, TokenNameFinderEvaluationMonitor... listeners)
Name finder cross validator- Parameters:
languageCode
- the language of the training datatype
- null or an override type for all types in the training datatrainParams
- machine learning train parametersfeatureGeneratorBytes
- descriptor to configure the feature generation or nulllisteners
- a list of listenersresources
- the resources for the name finder or null if none
-
TokenNameFinderCrossValidator
public TokenNameFinderCrossValidator(java.lang.String languageCode, java.lang.String type, TrainingParameters trainParams, byte[] featureGeneratorBytes, java.util.Map<java.lang.String,java.lang.Object> resources, TokenNameFinderEvaluationMonitor... listeners)
-
TokenNameFinderCrossValidator
public TokenNameFinderCrossValidator(java.lang.String languageCode, java.lang.String type, TrainingParameters trainParams, TokenNameFinderFactory factory, TokenNameFinderEvaluationMonitor... listeners)
-
-
Method Detail
-
evaluate
public void evaluate(ObjectStream<NameSample> samples, int nFolds) throws java.io.IOException
Starts the evaluation.- Parameters:
samples
- the data to train and testnFolds
- number of folds- Throws:
java.io.IOException
-
getFMeasure
public FMeasure getFMeasure()
-
-