Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
tools-1.5.1-incubating
-
None
Description
When I execute
opennlp SentenceDetectorEvaluator -encoding UTF-8 -model pt.sentdetect.model -data pt.sentdetect.test
the result is
Usage: opennlp SentenceDetectorEvaluator -encoding charset -model model -data testData
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.
if (args.length != 4) { System.out.println(getHelp()); throw new TerminateToolException(1); }
Actually args.length is 6. Changing the condition to args.length < 6 solves the problem.