From 771774637e64d5fab733e911b1e1aaa08ed7bad7 Mon Sep 17 00:00:00 2001 From: yv Date: Sun, 30 Oct 2016 18:57:05 +0100 Subject: [PATCH] Cope with multiple empty lines setting sentence to null prevents the sentence from being inserted multiple times when there are multiple empty lines instead of just one. --- .../src/main/java/de/tu/darmstadt/lt/ner/reader/NERReader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/germaner/src/main/java/de/tu/darmstadt/lt/ner/reader/NERReader.java b/germaner/src/main/java/de/tu/darmstadt/lt/ner/reader/NERReader.java index 7fae1bf..3cffcaa 100644 --- a/germaner/src/main/java/de/tu/darmstadt/lt/ner/reader/NERReader.java +++ b/germaner/src/main/java/de/tu/darmstadt/lt/ner/reader/NERReader.java @@ -124,6 +124,7 @@ public void process(JCas jcas) } positionIndex = 0; } + sentence = null; // init new sentence with the next recognized token initSentence = true; sentenceSb = new StringBuffer(); @@ -288,4 +289,4 @@ public Reader getReader(String aName) } return null; } -} \ No newline at end of file +}