[ 
https://issues.apache.org/jira/browse/OPENNLP-1454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714740#comment-17714740
 ] 

ASF GitHub Bot commented on OPENNLP-1454:
-----------------------------------------

mawiesne commented on code in PR #101:
URL: https://github.com/apache/opennlp-sandbox/pull/101#discussion_r1173057285


##########
opennlp-similarity/src/main/java/opennlp/tools/textsimilarity/ParseTreeChunkListScorer.java:
##########
@@ -78,15 +79,12 @@ public double getScore(ParseTreeChunk chunk) {
         }
       } else if (l.startsWith(LemmaGeneralizer.W2V_PREFIX) ){
          try {
-                       float val = 
Float.parseFloat(l.substring(LemmaGeneralizer.W2V_PREFIX.length()));
-                         score+= 1- val;
-               } catch (NumberFormatException e) {
-                       e.printStackTrace();
-               }
-      }
-      
-      else {
-
+          float val = 
Float.parseFloat(l.substring(LemmaGeneralizer.W2V_PREFIX.length()));
+            score+= 1- val;
+        } catch (NumberFormatException e) {
+          e.printStackTrace();

Review Comment:
   Wonder, why I did not spot that one, thought I adjusted it. Will change this 
occurrence tmrw.





> Convert System.out statements to debug logging statements in 
> 'opennlp-similarity' sandbox component
> ---------------------------------------------------------------------------------------------------
>
>                 Key: OPENNLP-1454
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1454
>             Project: OpenNLP
>          Issue Type: Task
>          Components: Similarity
>    Affects Versions: 2.1.0
>            Reporter: Martin Wiesner
>            Assignee: Martin Wiesner
>            Priority: Minor
>
> In several classes of the 'opennlp-similarity' sandbox component, commented 
> System.out statements exist that have a debug statement flavor. Yet, in tests 
> and at runtime those spam the console quite heavily. That's why those have 
> been commented out during the compatibility migration towards tools version 
> 2.1.x conducted for all sandbox components.
> The aim of that issue is to convert those spammy log behavior by making use 
> of the slf4j-api. The code contains the spots marked with a TODO notice and 
> this issue number for which a switch to a logging framework with "trace" or 
> "debug" levels could be considered.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to