You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by "mawiesne (via GitHub)" <gi...@apache.org> on 2023/04/20 20:26:19 UTC

[GitHub] [opennlp-sandbox] mawiesne commented on a diff in pull request #101: OPENNLP-1454 Convert System.out statements to debug logging statements in 'opennlp-similarity'

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.



-- 
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: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org