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

Jörn Kottmann closed OPENNLP-161.
---------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: tools-1.5.1-incubating)
                   tools-1.5.2-incubating

> 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

Reply via email to