You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Ioan Barbulescu (JIRA)" <ji...@apache.org> on 2013/08/25 10:21:51 UTC
[jira] [Created] (OPENNLP-594) opennlp.tools.parser.Parse.remove()
throws IndexOutOfBoundsException
Ioan Barbulescu created OPENNLP-594:
---------------------------------------
Summary: opennlp.tools.parser.Parse.remove() throws IndexOutOfBoundsException
Key: OPENNLP-594
URL: https://issues.apache.org/jira/browse/OPENNLP-594
Project: OpenNLP
Issue Type: Bug
Components: Parser
Affects Versions: tools-1.5.3
Environment: Windows 7 + java 1.7.0_21
Reporter: Ioan Barbulescu
Priority: Minor
Parse.remove() throws IndexOutOfBoundsException if you attempt to remove the last child node of the current node (i.e. if you call remove(0) and this node has only one sub-node).
Some background info: I was trying to remove the TK nodes from a parse.
I attached the diff file for the change fixing the bug.
The change is simple: a supplementary check:
if(! parts.isEmpty())
before rebuilding the span.
Thank you
Ioan
P.S. this is my first reported bug, so please be gentle :) Please tell me if something is wrong with this issue, so that I fix it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira