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: UIMA Fit and fsIndexCollection
Date Sun, 06 Aug 2017 19:56:33 GMT
Hi William,

the uimaFIT JCasUtil/CasUtil methods only use the built-in 
default index for the Annotation type. If you want to use 
a custom index, you have to retrieve that index from the CAS's
index repository and operate on it directly.

Cheers,

-- Richard

> On 05.08.2017, at 14:31, William Colen <colen@apache.org> wrote:
> 
> Hi,
> 
> I am having an issue with UIMA Fit and fsIndexCollection. I
> configured META-INF/org.uimafit/fsindexes.txt to load the following
> fsIndexCollection:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <fsIndexCollection xmlns="http://uima.apache.org/resourceSpecifier">
>  <fsIndexes>
>    <fsIndexDescription>
>      <label>MyFsIndexDescription</label>
>      <typeName>myproject.uima.ts.ShiftedAnnotation</typeName>
>      <kind>sorted</kind>
>      <keys>
>        <fsIndexKey>
>          <featureName>begin</featureName>
>          <comparator>standard</comparator>
>        </fsIndexKey>
>        <fsIndexKey>
>          <featureName>end</featureName>
>          <comparator>reverse</comparator>
>        </fsIndexKey>
>        <fsIndexKey>
>          <featureName>index</featureName>
>          <comparator>standard</comparator>
>        </fsIndexKey>
>      </keys>
>    </fsIndexDescription>
>  </fsIndexes>
> </fsIndexCollection>
> 
> Debugging the code I can see that the file is loaded
> by createFsIndexCollection() during initialization of the AEs.
> 
> But when I retrieve the annotation using JCasUtil.indexCovered(...) and the
> "index" and I never get the result ordered by index if begin and end are
> equal.
> 
> Any idea why?
> 
> Thank you,
> William


Mime
View raw message