On 4/25/07, Thilo Goetz <[EMAIL PROTECTED]> wrote:
Thanks, but the question was specifically: how can you do that *without* running the two annotators in an aggregate. I've been thinking you could create an aggregate to create the JCas, then run the individual annotators manually. However, I don't see how you can do that with the official UIMA APIs.
It is possible to create a JCas that can be shared between your annotators. Its type system, indexes, and type priorities will be merged from all the annotator descriptors. This is described in the manual in section "Using Multiple Analysis Engines and Creating Shared CASes" (section 3.2.6 in the 2.1.0 release). Here's the example code: AnalysisEngineDescription aeDesc1 = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(...); AnalysisEngineDescription aeDesc2 = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(...); CasConsumerDescription ccDesc = UIMAFramework.getXMLParser().parseCasConsumerDescription(...); List list = new ArrayList(); list.add(aeDesc1); list.add(aeDesc2); list.add(ccDesc); CAS cas = CasCreationUtils.createCas(list); // (optional, if using the JCas interface) JCas jcas = cas.getJCas(); Regards, -Adam
