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/10/01 12:27:24 UTC
[jira] [Commented] (OPENNLP-597) Code in tools/parser throws some
NullPointerExceptions when dealing with poor training data
[ https://issues.apache.org/jira/browse/OPENNLP-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13782790#comment-13782790 ]
Ioan Barbulescu commented on OPENNLP-597:
-----------------------------------------
Hi
Fixed as per your suggestion - printing of exception stack trace aded.
Also fixed the only place where "this.parts" can become null - simply replaced it with
parts = new linkedlist...
New patch attached.
> Code in tools/parser throws some NullPointerExceptions when dealing with poor training data
> -------------------------------------------------------------------------------------------
>
> Key: OPENNLP-597
> URL: https://issues.apache.org/jira/browse/OPENNLP-597
> 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
> Fix For: 1.6.0
>
> Attachments: Parse.java.patch
>
>
> I was trying to train the Treebank Parser with some new data.
> Truth to be told, the data was in poor format. Specifically, instead of "(-RRB- -RRB-)", it contained "( -RRB-)".
> The same for -LRB- constructions.
> Due to this input data, the parsing code was throwing some NullPointerException errors.
> The fixes consist in some supplementary "if()"s, to safeguard against null pointers.
> Fixes are in 3 files, attached as diff. The diff was created by svn, run in the opennlp-tool/.../parser directory.
--
This message was sent by Atlassian JIRA
(v6.1#6144)