On 25. Nov 2018, at 22:05, Richard Eckart de Castilho <[email protected]> wrote:
> 
>> 
>> Can you say where the feature structure order changed in comparison to v2?  
>> I'm
>> trying to keep things as much as reasonably possible the same, except if 
>> there
>> is some kind of performance implication, etc.
> 
> The following code seems to work consistently for UIMA v2, but fails sooner or
> later for UIMA v3.

I was hitting this change in behavior in the UIMAv3 branch of DKPro Core. It 
seems
that I can work around the change there by sorting FSes by their ID:

            List<FeatureStructure> heads = new ArrayList<>(
                    CasUtil.selectFS(aJCas.getCas(), headType));
            heads.sort(Comparator.comparing(fs -> 
aJCas.getLowLevelCas().ll_getFSRef(fs)));

Cheers,

-- Richard

Reply via email to