You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Vinh Khuc (JIRA)" <ji...@apache.org> on 2014/08/05 05:50:12 UTC
[jira] [Closed] (OPENNLP-704) IllegalStateException: Must be
started first! in SentenceDetectorTool
[ https://issues.apache.org/jira/browse/OPENNLP-704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vinh Khuc closed OPENNLP-704.
-----------------------------
Resolution: Fixed
Fix Version/s: 1.6.0
> IllegalStateException: Must be started first! in SentenceDetectorTool
> ---------------------------------------------------------------------
>
> Key: OPENNLP-704
> URL: https://issues.apache.org/jira/browse/OPENNLP-704
> Project: OpenNLP
> Issue Type: Bug
> Components: Command Line Interface
> Affects Versions: 1.6.0
> Reporter: Eugen Hanussek
> Assignee: Vinh Khuc
> Priority: Trivial
> Labels: easyfix
> Fix For: 1.6.0
>
>
> trying to use the cmd-line tool, see [doku|http://opennlp.apache.org/documentation/1.5.3/manual/opennlp.html#tools.sentdetect.detection.cmdline], I get the exception:
> {noformat}
> C:\proj\apache-opennlp-1.6.0-SNAPSHOT\bin>opennlp SentenceDetector de-sent.bin < en-sent-input.txt
> Loading Sentence Detector model ... done (0,078s)
> Pierre Vinken, 61 years old, will join the board as a nonexecutive director Nov.
> 29. Mr.
> Vinken is
> chairman of Elsevier N.V., the Dutch publishing group.
> Rudolph Agnew, 55 years
> old and former chairman of Consolidated Gold Fields PLC, was named a director of this
> British industrial conglomerate.
> Exception in thread "main" java.lang.IllegalStateException: Must be started first!
> at opennlp.tools.cmdline.PerformanceMonitor.incrementCounter(PerformanceMonitor.java:68)
> at opennlp.tools.cmdline.sentdetect.SentenceDetectorTool.run(SentenceDetectorTool.java:76)
> at opennlp.tools.cmdline.CLI.main(CLI.java:227)
> {noformat}
> I fixed it localy in SentenceDetectorTool:
> {noformat}
> ...
> public void run(String[] args) {
> ...
> PerformanceMonitor perfMon = new PerformanceMonitor(System.err, "sent");
> try {
> perfMon.start(); // <==== the fix
> ...
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)