You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by GitBox <gi...@apache.org> on 2020/06/04 14:30:14 UTC

[GitHub] [opennlp] jzonthemtn opened a new pull request #377: Fix Java 8 vs 11 test inconsistencies

jzonthemtn opened a new pull request #377:
URL: https://github.com/apache/opennlp/pull/377


   Thank you for contributing to Apache OpenNLP.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [X] Is there a JIRA ticket associated with this PR? Is it referenced 
        in the commit message?
   
   - [X] Does your PR title start with OPENNLP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [X] Has your PR been rebased against the latest commit within the target branch (typically master)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [ ] Have you ensured that the full suite of tests is executed via mvn clean install at the root opennlp folder?
   - [ ] Have you written or updated unit tests to verify your changes?
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
   - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file in opennlp folder?
   - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found in opennlp folder?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
   


----------------------------------------------------------------
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.

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



[GitHub] [opennlp] jzonthemtn commented on a change in pull request #377: OPENNLP-1285: Fix Java 8 vs 11 test inconsistencies

Posted by GitBox <gi...@apache.org>.
jzonthemtn commented on a change in pull request #377:
URL: https://github.com/apache/opennlp/pull/377#discussion_r436409417



##########
File path: opennlp-tools/src/test/java/opennlp/tools/eval/SourceForgeModelEval.java
##########
@@ -410,7 +410,7 @@ public void evalParserModel() throws Exception {
       }
     }
 
-    Assert.assertEquals(new BigInteger("312218841713337505306598301082074515847"),
+    Assert.assertEquals(new BigInteger("68039262350771988792233880373220954061"),

Review comment:
       @kinow This number changed a lot because it is an MD5 hash value. Looks like the test is using the parser chunking model to parse the `leipzig/eng_news_2010_300K-sentences.txt` input file. At the end it computes the hash of the parse string and compares it to an expected value.
   
   `StrictMath` must be causing a difference that's visible in the hash value. I'm guessing it's probably like those other tests where it's a small rounding difference somewhere.
   
   I did verify that `68039262350771988792233880373220954061` is the same value on Java 8 and Java 11. 




----------------------------------------------------------------
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.

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



[GitHub] [opennlp] kinow commented on a change in pull request #377: OPENNLP-1285: Fix Java 8 vs 11 test inconsistencies

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #377:
URL: https://github.com/apache/opennlp/pull/377#discussion_r435686123



##########
File path: opennlp-tools/src/test/java/opennlp/tools/eval/SourceForgeModelEval.java
##########
@@ -410,7 +410,7 @@ public void evalParserModel() throws Exception {
       }
     }
 
-    Assert.assertEquals(new BigInteger("312218841713337505306598301082074515847"),
+    Assert.assertEquals(new BigInteger("68039262350771988792233880373220954061"),

Review comment:
       The change of precision in the other tests was small compared to this one. This was the only thing that got my eye from reading the changes here. Pretty much everything else appears to be just s/Math/StrictMath.




----------------------------------------------------------------
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.

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



[GitHub] [opennlp] jzonthemtn commented on a change in pull request #377: OPENNLP-1285: Fix Java 8 vs 11 test inconsistencies

Posted by GitBox <gi...@apache.org>.
jzonthemtn commented on a change in pull request #377:
URL: https://github.com/apache/opennlp/pull/377#discussion_r436053463



##########
File path: opennlp-tools/src/test/java/opennlp/tools/eval/SourceForgeModelEval.java
##########
@@ -410,7 +410,7 @@ public void evalParserModel() throws Exception {
       }
     }
 
-    Assert.assertEquals(new BigInteger("312218841713337505306598301082074515847"),
+    Assert.assertEquals(new BigInteger("68039262350771988792233880373220954061"),

Review comment:
       I will double-check that one and make sure that value is correct.




----------------------------------------------------------------
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.

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



[GitHub] [opennlp] jzonthemtn merged pull request #377: OPENNLP-1285: Fix Java 8 vs 11 test inconsistencies

Posted by GitBox <gi...@apache.org>.
jzonthemtn merged pull request #377:
URL: https://github.com/apache/opennlp/pull/377


   


----------------------------------------------------------------
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.

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



[GitHub] [opennlp] kinow commented on a change in pull request #377: OPENNLP-1285: Fix Java 8 vs 11 test inconsistencies

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #377:
URL: https://github.com/apache/opennlp/pull/377#discussion_r436409605



##########
File path: opennlp-tools/src/test/java/opennlp/tools/eval/SourceForgeModelEval.java
##########
@@ -410,7 +410,7 @@ public void evalParserModel() throws Exception {
       }
     }
 
-    Assert.assertEquals(new BigInteger("312218841713337505306598301082074515847"),
+    Assert.assertEquals(new BigInteger("68039262350771988792233880373220954061"),

Review comment:
       Ah, got it @jzonthemtn , had no idea it was a md5 hash. All good then 🥇 👍 




----------------------------------------------------------------
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.

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



[GitHub] [opennlp] jzonthemtn commented on pull request #377: OPENNLP-1285: Fix Java 8 vs 11 test inconsistencies

Posted by GitBox <gi...@apache.org>.
jzonthemtn commented on pull request #377:
URL: https://github.com/apache/opennlp/pull/377#issuecomment-641939185


   This also fixed [OPENNLP-1113](https://issues.apache.org/jira/browse/OPENNLP-1113).


----------------------------------------------------------------
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.

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