public class NIFPositionHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
NIFPositionHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkPositionsForConspicuity(List<Span> spans,
String text)
This method checks the given
Span instances for simple errors,
e.g., markings that start or end with a whitespace instead of an
alphanumeric character. |
static void |
correctAnnotationPositions(Document document)
The positions in NIF are measured in codepoints, while Java counts in
terms of characters.
|
private static void |
printWarning(String text,
int start,
int end,
String warningMsg) |
public static void correctAnnotationPositions(Document document)
document - the Document for which the positions should be checked
and corrected if necessarypublic static void checkPositionsForConspicuity(List<Span> spans, String text)
Span instances for simple errors,
e.g., markings that start or end with a whitespace instead of an
alphanumeric character. If errors are found, a waring is printed.Copyright © 2018. All rights reserved.