I have a UIMA pipeline that does the following:
- It gets a text
- If said text is longer than x characters, it splits the text into several JCas
- It does the processing separately for all the JCas
- It merges the JCases into a single one
It is basically the same as the "Using a CAS Multiplier to Merge CASes" example provided by UIMA does, but using uimaFIT and without the XMI Descriptor Files.
The problem is that the new merged JCas is never output.
After calling aggregateEngine.process(jCas);
, jCas has the same value as it had at the beginning.
I also tried using JCasIterator casIterator = aggregateEngine.processAndOutputNewCASes(jCas);
and iterating over the casIterator, but it is empty.
To make sure the JCas is properly merged and not a problem of my splitter or merger, I added an XmiWriter to the end of my pipeline, and it outputs the expected JCas's XMI.
The problem, then, seems to be that the original JCas is never replaced with the final one.
I imagine this issue has something to do with the Operational Propertie: outputsNewCASes being false.
I've tried adding the following uimaFIT descriptor to the beginning of my Merger class with no success:
@OperationalProperties (outputsNewCases = true, modifiesCas = false)
Does anyone know if this may be the problem and how to fix it?
PS: I don't use XML Analysis Engin Descriptor Files because my Maven project's layout messes up with UIMA Nature's structure, and I haven't found a proper layout solution.
PPS: I haven't included the code because it is quite long, but if you think it is needed, I will edit the question with it.