Closed lfoppiano closed 5 years ago
Super thanks !
After some tests, it appears that there are 3 System.out.println()
missing to display the evaluation report string.
One in the main of SoftwareTrainer.java
:
public static void main(String[] args) {
try {
String pGrobidHome = SoftwareProperties.get("grobid.home");
GrobidHomeFinder grobidHomeFinder = new GrobidHomeFinder(Arrays.asList(pGrobidHome));
GrobidProperties.getInstance(grobidHomeFinder);
System.out.println(">>>>>>>> GROBID_HOME="+GrobidProperties.get_GROBID_HOME_PATH());
} catch (final Exception exp) {
System.err.println("GROBID software initialisation failed: " + exp);
exp.printStackTrace();
}
Trainer trainer = new SoftwareTrainer();
System.out.println(AbstractTrainer.runEvaluation(trainer));
System.exit(0);
}
And two in the main of SoftwareTrainerRunner.java
:
switch (mode) {
case TRAIN:
AbstractTrainer.runTraining(trainer);
break;
case EVAL:
System.out.println(AbstractTrainer.runEvaluation(trainer));
break;
case SPLIT:
System.out.println(AbstractTrainer.runSplitTrainingEvaluation(trainer, split));
break;
default:
throw new IllegalStateException("Invalid RunType: " + mode.name());
}
System.exit(0);
Ooopss... I missed them..
They should be there now
yes! ready to be pushed after the merge on grobid thanks!
This should fix the compatibility with the updated evaluation framework in grobid (PR, not yet in master: https://github.com/kermitt2/grobid/pull/280).
I tried to test it but the evaluation phase was requiring a file that is not in the repository, so I didn't really tested it.
I've added just a
toString()
because the new EvaluationUtils are returning an object. I think applying now should not break anything.