uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject Re: Annotation Index not recognized with Linux
Date Mon, 16 Jan 2017 20:37:31 GMT
Hi Sean,

> On 16.01.2017, at 18:38, Murphy, Sean P. <Murphy.Sean@mayo.edu> wrote:
>> You're using UIMA on iOS?! Can we learn more about that? (Sorry, not your question...)
> 	This is pretty straightforward with an Mac system running eclipse (I'm not sure if is
considered a Linux derived environment , but it was running the same test suite successfully
so I brought it up).  

Ah, OS X/macOS then - I thought you'd be actually running UIMA on an iOS device (iPhone, iPad,

>> The indexes page of what? 
> 	This would be of the indexes page of the main analysis flow; as in the Component Descriptor
Editor -> Indexes (Tab) of the Aggregate engine type descriptor.   


>> And how do you instantiate your components/pipeline?		
> 	Our approach is fairly standard, but here are the basics:
> 	ResourceSpecifier taeSpecifier = UIMAFramework.getXMLParser()
> 				.parseResourceSpecifier(new XMLInputSource(new File(taeDesc)));
> 		// iv_tae = UIMAFramework.produceTAE(taeSpecifier);
> 		iv_ae = UIMAFramework.produceAnalysisEngine(taeSpecifier);
> 		iv_AEPool = new JCasPool(2, iv_ae);

Ok, that looks like UIMA should be able to pick up the index definition, at least assuming
that the descriptor that you edited before is the same as the taeDesc that you are passing
to the XMLInputSource here.

>> As far as I know, the default annotation index is just that - if you define a custom
index over the Annotation type, then it would change. But in order to use your custom index
over ConceptMention, you'd have to explicitly fetch that index via CAS/JCas.getIndex(...).
> I tried to explain how I utilized this fetch via  FSIterator cmIter = jcas.getAnnotationIndex(ConceptMention.type).iterator().
 Is there a difference that I'm missing?

The documentation for jcas.getAnnotationIndex(Type type) says:

  "Get the *standard annotation index* restricted to a specific annotation type."

I haven't tried it, but I would say if that is correct then you do not get your
custom index but the default one.

Try using instead jcas.getIndex(label, clazz) and pass as the label parameter the name you
for your custom index in the Component Descriptor Editor -> Indexes (Tab).

  jcas.getIndex("name of your custom index", ConceptMention.class).iterator()

Good luck!

-- Richard

View raw message