Hi,

I am using opennlp with UIMA and I have a question on using the chunker.
Currently, I can successfully run the sentence splitter, tokenizer and part
of speech tagger having them as descriptors and creating an aggregate over
this. However, when I try to add in the chunker descriptor, it fails in the
chunker initialization due to this.

7/5/12 4:34:01 PM - 10:
org.apache.uima.resource.impl.ResourceManager_impl.initializeExternalResources:
WARNING: The external resource named modelfile has been declared multiple
times with different definitions. The definition of the resource in
component /SentenceDetector/ will be used.  The definition in component
/ChunkerTagger/ will be ignored.
7/5/12 4:34:01 PM - 10: opennlp.uima.chunker.Chunker.initialize(113): INFO:
Initializing the OpenNLP Chunker annotator.
7/5/12 4:34:01 PM - 10:
org.apache.uima.tools.cvd.MainFrame.handleException(527): SEVERE:
Initialization of annotator class "opennlp.uima.chunker.Chunker" failed.
(Descriptor: file:/D:/CSA/LPT/descriptors/ChunkerTagger.xml)
org.apache.uima.resource.ResourceInitializationException: Initialization of
annotator class "opennlp.uima.chunker.Chunker" failed.  (Descriptor:
file:/D:/CSA/LPT/descriptors/ChunkerTagger.xml)
                Caused by: java.lang.ClassCastException:
opennlp.uima.sentdetect.SentenceModelResourceImpl cannot be cast to
opennlp.uima.chunker.ChunkerModelResource
This can be easily repro'ed by adding the chunker descriptor to the
sentence splitter descriptor in opennlp.uima.OpenNlpTextAnalyzer.   This
exception seems to be caused by the fact that the required parameter for
both sentence splitter and chunker is the same opennlp.uima.ModelName.

http://opennlp.apache.org/documentation/1.5.2-incubating/apidocs/opennlp-uima/opennlp/uima/chunker/Chunker.html

http://opennlp.apache.org/documentation/1.5.2-incubating/apidocs/opennlp-uima/opennlp/uima/sentdetect/SentenceDetector.html

Since they require different input values, it seems to cause a conflict and
the value specified for chunker is overrriden with the resource for the
sentence.
Can someone let me know how can I resolve this and get the chunker to work?

Thanks,
Aravind.

Reply via email to