I am trying ot use the opennlp.uima sub-project with UIMA. I am very new to all this technology. Using CVS I grabbed the latest opennlp.uima and did "mvn package" which successfully generated the PEAR. I also have the latest apache UIMA release and ran the prerequesite adjustExamplePaths.sh. and I think another along with setting UIMA_HOME. I installed the PEAR using the "runPearInstaller.sh" program, installing it do a directory of my choosing. Then I ran "cpeGui.sh" where I configured a FileSystemCollectionReader, then opennlp OpenNlpTextAnalyzer and then AnnotationPrinter. I click run but get an error:
Caused by: org.apache.uima.resource.ResourceInitializationException: Could not access the resource data at file:SentenceFinder.bin.
Looking a little deeper at internals reveals that "file:SentenceFinder.bin" is set in the OpenNlpTextAnalyzer.xml. What do I do to get this to resolve?
So I assume pear validation went fine on install? Please run the pear in the CVD tool that comes with UIMA. An easy way to do so is to install it again and click the "Run your AE in the CAS Visual Debugger" button.
Thanks so much for your assistance, Thilo.
The pear installation ended with successful verification.
I didn't have luck with the CVD, however. It comes up, then pauses for perhaps 10 seconds, then throws up an Exception dialog reporting a UIMA ResourceInitializationException, error initializing "org.apache.uima.analysis_engine.impl.PearAnalysisEngineWrapper" from descriptor file PATH_TO_PEAR_INSTALL_DIR/opennlp.uima.OpenNlpTextAnalyzer/opennlp.uima.OpenNlpTextAnalyzer_pear.xml. It also said that more detailed into is in "the log file" - which log file, I don't know. Then it gave an error, "No AE loaded". Ok, I found the applicable log file after all in ~/.uima.log.1. It displays the familiar out-of-memory error for the Java heap space.
Interestingly, just now I openned the CVD directly, selecting the OpenNlpTextAnalyzer, and a 65KB plain text document. After seemingly a few minutes of processing it finally returned some interesting results. The cpeGui program still fails, however.
You can find the log file in CVD in the "tools" menu.
If it's an OOM, then have you tried starting it with more memory?
When I run the CVD directly (not via the installer) I apparently had enough memory because it works. The principle bug / problem I am trying to resolve in this discussion is using the cpeGui which fails because it can't resolve "file:SentenceFinder.bin".
FYI Ultimately, I'm considering using UIMA in an embedded way as part of a data acquisition, processing pipeline and it'd be nice to use common/open APIs (e.g. UIMA) instead of opennlp directly which I have already experimented with.
Personally, I do not recommend using the UIMA CPE, GUI or no GUI; particularly not if you're planning to run your UIMA app embedded in some other application. Of course there are other opinions, otherwise the CPE wouldn't exist. However, my advice to you is to use the UIMA analysis engine APIs as described here:
If things work in CVD, they will work this way as well. CVD is just a GUI wrapper around this API.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.