String locationOfModelPath = modelPathPrefix + "location_of";
// create the modifier extractor
System.err.println("Training modifier extractor");
File modifierTrainDirectory = new File(resourcesDirectory, modifierModelPath);
ModifierExtractorEvaluation evaluation =
new ModifierExtractorEvaluation(
modifierTrainDirectory,
ModifierExtractorEvaluation.BEST_PARAMETERS);
evaluation.train(evaluation.getCollectionReader(trainFiles), modifierTrainDirectory);
AnalysisEngineDescription modifierExtractorDesc =
AnalysisEngineFactory.createPrimitiveDescription(
ModifierExtractorAnnotator.class,
GenericJarClassifierFactory.PARAM_CLASSIFIER_JAR_PATH,
"/" + modifierModelPath + "/model.jar");