You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/12/20 13:45:00 UTC

[jira] [Commented] (OPENNLP-1321) se LinkedHashMap for deterministic iteration order

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

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

jzonthemtn merged pull request #387:
URL: https://github.com/apache/opennlp/pull/387


   


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


> se LinkedHashMap for deterministic iteration order
> --------------------------------------------------
>
>                 Key: OPENNLP-1321
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1321
>             Project: OpenNLP
>          Issue Type: Improvement
>            Reporter: Yi-Lin Wang
>            Priority: Minor
>
> The test {{opennlp.tools.ml.naivebayes.NaiveBayesSerializedCorrectnessTest#testPlainTextModel}} can fail due to a different iteration order of HashMap. The error message is as follows:
>  
> {{[ERROR] testPlainTextModel(opennlp.tools.ml.naivebayes.NaiveBayesSerializedCorrectnessTest)  Time elapsed: 0.01 s  <<< FAILURE!
> org.junit.ComparisonFailure:
> expected:<...ports
> ...}}
> The fix is to change HaskMap to LinkedHashMap so that the iteration order remains stable and the failure will not occur any more. In this way, the test will be more stable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)