From 2bfd55774202dc0782202c4bb797ccbc9ae18016 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Tue, 10 Nov 2020 11:22:27 +0900 Subject: [PATCH] cosmetics --- .../core/utilities/SentenceUtilities.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/grobid-core/src/main/java/org/grobid/core/utilities/SentenceUtilities.java b/grobid-core/src/main/java/org/grobid/core/utilities/SentenceUtilities.java index 38afe84976..d44bcf46b3 100644 --- a/grobid-core/src/main/java/org/grobid/core/utilities/SentenceUtilities.java +++ b/grobid-core/src/main/java/org/grobid/core/utilities/SentenceUtilities.java @@ -3,14 +3,14 @@ import org.grobid.core.exceptions.GrobidException; import org.grobid.core.lang.SentenceDetectorFactory; import org.grobid.core.layout.LayoutToken; - -import java.util.*; -import java.util.function.Predicate; -import java.util.stream.Collectors; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + /** * Class for using sentence segmentation (singleton). The actual sentence segmentation implementation * is specified in the Grobid configuration. See org.grobid.core.lang.impl.* for the available @@ -59,7 +59,7 @@ private SentenceUtilities() { } /** - * Basic run for sentence identification, return the offset positions of the + * Basic run for sentence identification, return the offset positions of the * identified sentences * * @param text text to segment into sentences @@ -77,7 +77,7 @@ public List runSentenceDetection(String text) { } /** - * Run for sentence identification with some forbidden span constraints, return the offset positions of the + * Run for sentence identification with some forbidden span constraints, return the offset positions of the * identified sentences without sentence boundaries within a forbidden span (typically a reference marker * and we don't want a sentence end/start in the middle of that). * @@ -123,9 +123,9 @@ public List runSentenceDetection(String text, List position.end) + if (forbiddenPos.start > position.end) break; while ( (forbiddenPos.start < position.end && position.end < forbiddenPos.end) ) { if (j+1 < sentencePositions.size()) {