[
https://issues.apache.org/jira/browse/OPENNLP-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17653683#comment-17653683
]
ASF GitHub Bot commented on OPENNLP-1434:
-----------------------------------------
rzo1 commented on code in PR #479:
URL: https://github.com/apache/opennlp/pull/479#discussion_r1060164388
##########
opennlp-uima/src/main/java/opennlp/uima/normalizer/NumberUtil.java:
##########
@@ -52,31 +51,36 @@ public static boolean isLanguageSupported(String
languageCode) {
}
/**
- * Removes trailing and containing space.
+ * Removes a character from given string {@code s}.
+ *
+ * @param s The string to process.
+ * @param remove The {@link Character} to remove from {@code s}.
*/
- private static String removeChar(String string, char remove) {
+ private static String removeChar(String s, char remove) {
Review Comment:
Alternative: As the method is `private` and only used for removing `' '`
from a given String, we could avoid dealing with the [hell of
whitespace](https://en.wikipedia.org/wiki/Whitespace_character) andjust replace
it with a call to `s.replaceAll("\\s+", "");` ?
##########
opennlp-uima/src/main/java/opennlp/uima/normalizer/NumberUtil.java:
##########
@@ -52,31 +51,36 @@ public static boolean isLanguageSupported(String
languageCode) {
}
/**
- * Removes trailing and containing space.
+ * Removes a character from given string {@code s}.
+ *
+ * @param s The string to process.
+ * @param remove The {@link Character} to remove from {@code s}.
*/
- private static String removeChar(String string, char remove) {
+ private static String removeChar(String s, char remove) {
Review Comment:
Alternative: As the method is `private` and only used for removing `' '`
from a given String, we could avoid dealing with the [hell of
whitespace](https://en.wikipedia.org/wiki/Whitespace_character) and just
replace it with a call to `s.replaceAll("\\s+", "");` ?
> Enhance JavaDoc in opennlp.uima packages
> ----------------------------------------
>
> Key: OPENNLP-1434
> URL: https://issues.apache.org/jira/browse/OPENNLP-1434
> Project: OpenNLP
> Issue Type: Improvement
> Components: UIMA Integration
> Affects Versions: 2.1.0
> Reporter: Martin Wiesner
> Assignee: Martin Wiesner
> Priority: Minor
> Fix For: 2.1.1
>
>
> The JavaDoc theĀ _opennlp.uima.*_ packages suffer from several inconsistencies
> and missing descriptions. Moreover, several typos are present that need
> sanitizing.
> The classes, interfaces, etc., require enhancements and/or additions to
> provide more clarity for readers.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)