@Test public void testEvaluateShortHandBasedSystem() throws FileNotFoundException, IOException, IllegalArgumentException, IOException, InstantiationException, IllegalAccessException { File resultsDirectory = new File("src/test/resources/chord/CH"); String systemName = "CH-System"; Evaluator evaluator = null; // test reader and setup for evaluation // evaluator = new ChordEvaluator(task, dataset, outputDirectory, workingDirectory, testSets, // false, null); evaluator = EvaluatorFactory.getEvaluator( task.getSubjectTrackMetadataName(), task, dataset, outputDirectory, workingDirectory, null, testSets, false, null); SingleTrackEvalFileType reader = new ChordShortHandTextFile(); evaluator.setGroundTruth(groundTruth); List<NemaData> resultsForAllTracks = reader.readDirectory(resultsDirectory, null); evaluator.addResults(systemName, systemName, testSets.get(0), resultsForAllTracks); // test evaluation NemaEvaluationResultSet results = evaluator.evaluate(); assertTrue(results != null); }
@Override public Evaluator getEvaluator() { Evaluator eval = new StructureEvaluator(); // EDIT FOR OTHER TASKS eval.setTask(task); eval.setDataset(dataset); eval.setGroundTruth(gtData); eval.setTestSets(testSets); return eval; }