Package opennlp.tools.namefind
Class TokenNameFinderCrossValidator
- java.lang.Object
-
- opennlp.tools.namefind.TokenNameFinderCrossValidator
-
public class TokenNameFinderCrossValidator extends Object
-
-
Constructor Summary
Constructors Constructor Description TokenNameFinderCrossValidator(String languageCode, String type, TrainingParameters trainParams, byte[] featureGeneratorBytes, Map<String,Object> resources, TokenNameFinderEvaluationMonitor... listeners)
TokenNameFinderCrossValidator(String languageCode, String type, TrainingParameters trainParams, byte[] featureGeneratorBytes, Map<String,Object> resources, SequenceCodec<String> codec, TokenNameFinderEvaluationMonitor... listeners)
Name finder cross validatorTokenNameFinderCrossValidator(String languageCode, 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(String languageCode, String type, TrainingParameters trainParams, byte[] featureGeneratorBytes, Map<String,Object> resources, SequenceCodec<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(String languageCode, String type, TrainingParameters trainParams, byte[] featureGeneratorBytes, Map<String,Object> resources, TokenNameFinderEvaluationMonitor... listeners)
-
TokenNameFinderCrossValidator
public TokenNameFinderCrossValidator(String languageCode, String type, TrainingParameters trainParams, TokenNameFinderFactory factory, TokenNameFinderEvaluationMonitor... listeners)
-
-
Method Detail
-
evaluate
public void evaluate(ObjectStream<NameSample> samples, int nFolds) throws IOException
Starts the evaluation.- Parameters:
samples
- the data to train and testnFolds
- number of folds- Throws:
IOException
-
getFMeasure
public FMeasure getFMeasure()
-
-