Hi Richard! It looks like your absolutely right. I have changed all JCas stuff in the consumer's resource to pure CAS and it works.
But why is JCas support not initialized? The reader calls an annotator for document meta data that uses JCas. It says "new DocumentMetaData(cas.getJCas())" and actually is annotated in the CAS. All annotator's descriptions are build with AnalysisEngineFactory.createEngineDescription or read from an XML file. They are added to an AggregateBuilder. The aggregate description is given as second argument to SimplePipeline.runPipeline(). The first argument is the reader's descriptions. One of the ae's is the cas.getJCas() one you mentioned earlier. What am I missing? Has anything changed from uimaFit 2.0.0 to 2.1.0? Cheers Armin -----Ursprüngliche Nachricht----- Von: Richard Eckart de Castilho [mailto:[email protected]] Gesendet: Donnerstag, 24. Juli 2014 15:59 An: [email protected] Betreff: Re: DKpro StanfordNamedEntityRecognizer ClassCastException Hi Armin, the underlying problem is that you get a simple org.apache.uima.cas.impl.AnnotationImpl instead of a JCas class like de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity. Normally a CAS that has its JCas support initialized always returns JCas classes. But is is possible to work entirely without JCas classes and without initializing JCas support. In such a case, all AnnotationFS feature structures are returned as AnnotationImpl. I don't think this has anything to do with chaining resources. I'm pretty sure it is related to how CASes are created, (de)serialized, and/or passed through your pipeline (possibly through multipliers). If you find out that this is not related to CAS creation/propagation, I'll be very curious to hear about it! Cheers, -- Richard On 24.07.2014, at 15:27, [email protected] wrote: > Hello Richard! > > Your fix doesn't change anything. So I tried to narrow down the problem. At > least, I can tell that it is not a problem specific to DKPro. I have the same > kind of exception when not using DKPro at all. My guess now is that it maybe > has something to do with chaining resources. I tried some simple aes. They > run fine. When I try to run components with resources of resources, they > fail. That's all for now. I will try to find out more and report again. > > Cheers, > Armin
pgpz1Yte6p0A0.pgp
Description: PGP signature
