uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Turbati <turb...@info.uniroma2.it>
Subject newbie aggregate AE
Date Tue, 15 Jun 2010 08:25:12 GMT
Hi all,
I'm a newbie and I'm trying to build an aggregate AE from two (very 
simple) AE.
On this guide 

on page  49 (55) there is an example of an aggregate AE Descriptor, so 
I've copied and this is my AAE descriptor:

<?xml version="1.0" encoding="UTF-8"?>
<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
<delegateAnalysisEngine key="SimpleName">
<import location="./SimpleName/SimpleName_pear.xml"/>
<delegateAnalysisEngine key="EmailRecognizer">
<import location="./EmailRecognizer/EmailRecognizer_pear.xml" />
<name>Aggregate AE - Room Number and DateTime Annotators</name>
<description>Detects Room Numbers, Dates, and Times</description>

And this is the java code I'm using:

             pearDir = new File(aggregateAEPath).toURI();
             browser = new PackageBrowser(new File(pearDir.getPath()));
             in = new XMLInputSource(aggregateAEFilePath);
             specifier = 
             resManager = UIMAFramework.newDefaultResourceManager();
resManager.setExtensionClassPath(aeSimpleNamePath+"/bin",true); // TODO 
check if this is necessary
// TODO check if this is necessary
             ae = UIMAFramework.produceAnalysisEngine(specifier, 
resManager, null);
             ae.setConfigParameterValue("Encoding", "UTF-8");
             annotCas = ae.newJCas();
             FSIndex indexAnnotations = annotCas.getAnnotationIndex();
             Iterator<Annotation> annoIt = indexAnnotations.iterator();
                 Annotation annotation = annoIt.next();
                 String text = annotation.getCoveredText();
                 int begin = annotation.getBegin();
                 int end = annotation.getEnd();
                 String type = annotation.getType().getName();
                 System.out.println("text: "+text+"\tbegin: 

The problem is that the last System.out.println prints just all the 
input text and no annoation, while if I use a very similar code with the 
two simple AE I get all the annotation.

What am I doing wrong?





Dott. Andrea Turbati

AI Research Group PhD student,

Dept. of Computer Science, Systems and Production

University of Roma, Tor Vergata

Via del Politecnico 1 00133 ROMA (ITALY)

tel: +39 06 7259 7332 (lab)

e_mail: turbati@info.uniroma2.it

home page: http://art.uniroma2.it/turbati/


View raw message