You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Jörn Kottmann (JIRA)" <ji...@apache.org> on 2011/05/03 14:45:03 UTC

[jira] [Reopened] (OPENNLP-161) SentenceDetectorEvaluator has incorrect validation for number of command line arguments

     [ https://issues.apache.org/jira/browse/OPENNLP-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann reopened OPENNLP-161:
-----------------------------------


> SentenceDetectorEvaluator has incorrect validation for number of command line arguments
> ---------------------------------------------------------------------------------------
>
>                 Key: OPENNLP-161
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-161
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Sentence Detector
>    Affects Versions: tools-1.5.1-incubating
>            Reporter: Stanislav Peshterliev
>            Priority: Minor
>             Fix For: tools-1.5.2-incubating
>
>
> When I execute
> {code}
> opennlp SentenceDetectorEvaluator -encoding UTF-8 -model pt.sentdetect.model -data pt.sentdetect.test
> {code}
> the result is 
> {code}
> Usage: opennlp SentenceDetectorEvaluator -encoding charset -model model -data testData
> {code}
> I got the usage message although the right number of arguments.  After short investigation I have found out that in the class SentenceDetectorEvaluatorTool, the validation for number of arguments is incorrect.
> {code}
>     if (args.length != 4) {
>       System.out.println(getHelp());
>       throw new TerminateToolException(1);
>     }
> {code}
> Actually args.length is 6. Changing the condition to args.length < 6 solves the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira