Interface OffsetMappingNameFinder
- All Superinterfaces:
TokenNameFinder
A
TokenNameFinder that can additionally report detected spans in the character coordinates
of the original input, mapping back through any text normalization applied before detection.
TokenNameFinder.find(String[]) may report spans in the coordinates of the normalized text, which
differ from the caller's input when normalization changes the length.
findInOriginal(String[]) reports the same spans in original-input coordinates.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionSpan[]findInOriginal(String[] tokens) Finds names and returns theirspansin the character coordinates of the original input, regardless of any normalization applied before detection.Methods inherited from interface TokenNameFinder
clearAdaptiveData, find
-
Method Details
-
findInOriginal
Finds names and returns theirspansin the character coordinates of the original input, regardless of any normalization applied before detection.- Parameters:
tokens- The tokens to search.- Returns:
- The detected spans, in original-input character coordinates.
- Throws:
IllegalArgumentException- Thrown iftokensisnullor contains anulltoken.
-