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/22 00:47:34 UTC
[jira] [Closed] (OPENNLP-650) Parser command-line tool exception on
input line of solely whitespace.
[ https://issues.apache.org/jira/browse/OPENNLP-650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joern Kottmann closed OPENNLP-650.
----------------------------------
We never received feedback on the applied patch. The issue can be closed.
> Parser command-line tool exception on input line of solely whitespace.
> ----------------------------------------------------------------------
>
> Key: OPENNLP-650
> URL: https://issues.apache.org/jira/browse/OPENNLP-650
> Project: OpenNLP
> Issue Type: Improvement
> Components: Parser
> Affects Versions: tools-1.5.3
> Reporter: Aaron Binns
> Assignee: Joern Kottmann
> Fix For: 1.6.0
>
>
> In the Parser command-line tool, if an input line is comprised of solely whitespace, then you get an array index exception in parseLine
> String text = sb.substring(0, sb.length() - 1);
> because the whitespace doesn't produce any tokens thus sb.length() is 0, and you wind up with an end position of -1.
> Simple solution is to .trim() the input string in ParserTool.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)