krickert commented on PR #1109: URL: https://github.com/apache/opennlp/pull/1109#issuecomment-4826920162
@rzo1 `normalized` is now `CharSequence` as well, so both sides of the record are symmetric. We still always *produce* the normalized form as a `String` internally (`StringBuilder.toString()`), so callers that want the materialized result can use the new `normalizedString()` accessor. When `normalized` is already a `String`, that's a no-op (`String.toString()` returns `self`). `original` stays as whatever `CharSequence` the caller passed in (no forced copy); `normalizedString()` is the convenience path when you need an immutable `String` for matching/search. Added `AlignedTextTest` to cover both accessors and the span delegation. Pushed at `45ad38b3`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
