From 2b69f84b8ca0cb6fd243a0b09ee3bd0371e6c876 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Fri, 28 Jun 2019 09:36:47 +0900 Subject: [PATCH] test/training selection at unit level --- src/main/java/org/grobid/trainer/UnitTrainer.java | 1 + src/main/java/org/grobid/trainer/ValueTrainer.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/org/grobid/trainer/UnitTrainer.java b/src/main/java/org/grobid/trainer/UnitTrainer.java index e52379f3..0dce7957 100644 --- a/src/main/java/org/grobid/trainer/UnitTrainer.java +++ b/src/main/java/org/grobid/trainer/UnitTrainer.java @@ -161,6 +161,7 @@ public boolean accept(File dir, String name) { addFeatures(labels, writer, unitTokenPositions, labeledUnit.isUnitLeft()); writer.write("\n"); + writer = dispatchExample(trainingOutputWriter, evaluationOutputWriter, splitRatio); pos++; } } diff --git a/src/main/java/org/grobid/trainer/ValueTrainer.java b/src/main/java/org/grobid/trainer/ValueTrainer.java index 063e8bf1..1b51ebab 100644 --- a/src/main/java/org/grobid/trainer/ValueTrainer.java +++ b/src/main/java/org/grobid/trainer/ValueTrainer.java @@ -150,6 +150,7 @@ public boolean accept(File dir, String name) { addFeatures(labels, writer); writer.write("\n"); + writer = dispatchExample(trainingOutputWriter, evaluationOutputWriter, splitRatio); pos++; } }