You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Joern Kottmann (JIRA)" <ji...@apache.org> on 2014/10/16 23:18:33 UTC

[jira] [Commented] (OPENNLP-722) PerceptronPrepAttachTest fails only on Java 8

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

Joern Kottmann commented on OPENNLP-722:
----------------------------------------

During the indexing the features are mapped to integer ids. That is done for example in the TwoPassDataIndexer around line 138.

The following code run differently on Java 8 compared to Java 7:
Set<String> predicateSet = new HashSet<String>();

... some code which adds String to the predicateSet ...

for (Iterator<String> pi=predicateSet.iterator();pi.hasNext();index++) {
  String predicate = pi.next();  
  ...
} 

The ordering of the elements returned by the Iterator is not identical in the Java versions.

Anyway, that shouldn't be an issue since the code still assigns one unique id to each feature.

The "context" later on gets sorted by integer feature id. This is done in ComparableEvent around line  39.
Now the ordering of the features inside the context is different between the two versions. 



> PerceptronPrepAttachTest fails only on Java 8
> ---------------------------------------------
>
>                 Key: OPENNLP-722
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-722
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Build, Packaging and Test
>    Affects Versions: 1.6.0
>            Reporter: Joern Kottmann
>            Assignee: Joern Kottmann
>            Priority: Minor
>             Fix For: 1.6.0
>
>
> The test PerceptronPrepAttachTest.testPerceptronOnPrepAttachDataWithStepSizeDecrease fails if executed on Java 8.
> It would be really nice to track down the cause of that.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)