GitHub user aaronbinns opened a pull request:
https://github.com/apache/opennlp/pull/1
Trim whitespace from input string.
Fixes bug in command-line tool for Parser where an input string comprised
of whitespace only will trigger an array index exception in parseLine()
```
String text = sb.substring(0, sb.length() - 1);
```
because the whitespace won't produce any tokens.
By trimming the input string, it is treated the same as an empty
string/blank line.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aaronbinns/opennlp parsetool_trim
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/opennlp/pull/1.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1
----
commit f28eeacffa546ae3c02962059cbcb03ac9ef8235
Author: Aaron Binns <[email protected]>
Date: 2014-02-23T18:39:52Z
Trim input string so that a string composed of purely whitespace is
treated the same as an empty string.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
[email protected] or file a JIRA ticket with INFRA.
---