You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by aaronbinns <gi...@git.apache.org> on 2014/02/23 19:53:56 UTC

[GitHub] opennlp pull request: Trim whitespace from input string.

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 <ab...@taskrabbit.com>
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
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] opennlp pull request #1: Trim whitespace from input string.

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/opennlp/pull/1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---