[mercury-users] java / threads / UIMA
Tomas By
tomas at basun.net
Thu Aug 18 00:00:15 AEST 2011
Hi all,
I have a Mercury predicate that is currently not doing anything:
| :- pred lexlookup(string::in) is det.
| lexlookup(_).
|
| :- pragma foreign_export("Java",lexlookup(in),"lexlookup").
which is called by a Java procedure:
| public void process(JCas jcas) throws AnalysisEngineProcessException {
| String text = jcas.getDocumentText();
| lexlookup.lexlookup(text);
| System.out.println("done");
| }
overriding a `method' in a class that `extends' JCasAnnotator_ImplBase,
which means it is a UIMA `annotator' (see uima.apache.org).
Here is the call:
| class ProcessLexicon extends SwingWorker<Void,Void> {
| @Override
| public synchronized Void doInBackground() {
| try {
| Global.lex_engine.process(Global.cas);
| } catch (Exception x) {
| x.printStackTrace();
| }
| return null;
| }
| @Override
| public void done() {
| }
| }
The idea being that it runs in a separate thread.
However, it does not seem to terminate. The `done' is never printed.
Any ideas what goes wrong? How can I debug it?
/Tomas
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list