You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Suneel Marthi (JIRA)" <ji...@apache.org> on 2017/12/26 18:48:00 UTC
[jira] [Resolved] (OPENNLP-1132) Fail with exception if not enough
lines in leipzig parser
[ https://issues.apache.org/jira/browse/OPENNLP-1132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Suneel Marthi resolved OPENNLP-1132.
------------------------------------
Resolution: Fixed
> Fail with exception if not enough lines in leipzig parser
> ---------------------------------------------------------
>
> Key: OPENNLP-1132
> URL: https://issues.apache.org/jira/browse/OPENNLP-1132
> Project: OpenNLP
> Issue Type: Bug
> Components: Language Detector
> Affects Versions: 1.8.2
> Reporter: Peter Thygesen
> Assignee: Peter Thygesen
> Fix For: 1.8.4
>
>
> Exception in thread "main" java.lang.IndexOutOfBoundsException: toIndex = 100000
> at java.util.ArrayList.subListRangeCheck(ArrayList.java:1004)
> at java.util.ArrayList.subList(ArrayList.java:996)
> at opennlp.tools.formats.leipzig.LeipzigLanguageSampleStream$LeipzigSentencesStream.<init>(LeipzigLanguageSampleStream.java:65)
> at opennlp.tools.formats.leipzig.LeipzigLanguageSampleStream.read(LeipzigLanguageSampleStream.java:157)
> at opennlp.tools.formats.leipzig.LeipzigLanguageSampleStream.read(LeipzigLanguageSampleStream.java:42)
> at opennlp.tools.formats.leipzig.SampleShuffleStream.<init>(SampleShuffleStream.java:38)
> at opennlp.tools.formats.leipzig.LeipzigLanguageSampleStreamFactory.create(LeipzigLanguageSampleStreamFactory.java:76)
> at opennlp.tools.cmdline.AbstractConverterTool.run(AbstractConverterTool.java:106)
> at opennlp.tools.cmdline.CLI.main(CLI.java:256)
> line 65:
> Set<Integer> selectedLines = new HashSet<>(
> indexes.subList(0, sentencesPerSample * numberOfSamples));
> Fails if sentencesPerSample x numberOfSamples is larger than size of indexes (source file).
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)