opennlp-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinh Khuc (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (OPENNLP-704) IllegalStateException: Must be started first! in SentenceDetectorTool
Date Tue, 05 Aug 2014 03:48:11 GMT

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

Vinh Khuc reassigned OPENNLP-704:
---------------------------------

    Assignee: Vinh Khuc

> 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
>
> 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)

Mime
View raw message