Class TokenNameFinderCrossValidator


  • public class TokenNameFinderCrossValidator
    extends java.lang.Object
    • 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 data
        type - null or an override type for all types in the training data
        trainParams - machine learning train parameters
        featureGeneratorBytes - descriptor to configure the feature generation or null
        listeners - a list of listeners
        resources - 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)
    • 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 test
        nFolds - number of folds
        Throws:
        java.io.IOException
      • getFMeasure

        public FMeasure getFMeasure()