rzo1 commented on code in PR #543:
URL: https://github.com/apache/opennlp/pull/543#discussion_r1272217185
##########
opennlp-tools/src/main/java/opennlp/tools/util/StringUtil.java:
##########
@@ -79,6 +81,30 @@ public static String toLowerCase(CharSequence string) {
return new String(cp, 0, cp.length);
}
+ public static CharBuffer toLowerCaseCharBuffer(CharSequence sequence) {
+ CharBuffer result = CharBuffer.allocate(sequence.length());
+ for (int cp : sequence.codePoints().toArray()) {
+ for (char c : Character.toChars(Character.toLowerCase(cp))) {
+ result.append(c);
+ }
+ }
+ result.clear();
+ return result;
+ }
+
+ /*
+ public static CharBuffer toLowerCaseCharBuffer(CharSequence string) {
Review Comment:
Old code?
--
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]