uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Wunderlich <martin...@gmx.net>
Subject Re: Wrong CAS being passed on in AAE
Date Thu, 27 Aug 2015 08:10:09 GMT


> Am 26.08.2015 um 23:11 schrieb Richard Eckart de Castilho <rec@apache.org>:
> 
> 
> On 26.08.2015, at 22:58, Martin Wunderlich <martin_wu@gmx.net> wrote:
> 
>> Kinda like this. It’s bit more involved, because I was trying to spare you the
details. 
>> 
>> First AAE: (FC AE AE AE AE AE AE)
>> 
>> Second AAE: (AE AE AE AE AE)
>> 
>> This does not work: AAE*[ CR AAE (FC AE AE AE AE AE AE) AAE (AE AE AE AE AE) ]
>> 
>> This _does_ work: AAE*[ CR AAE (FC AE AE AE AE AE AE AE AE AE AE AE) ]
>> 
>> FC = FlowControlloer
>> RR = CollectionReader
> 
> The CR is always outside the AAE - it is handled separately.
> 
>> This does not work:CR AAE*[AAE (FC AE AE AE AE AE AE) AAE (AE AE AE AE AE) ]
>> 
>> This _does_ work: CR AAE*[AAE (FC AE AE AE AE AE AE AE AE AE AE AE) ]
> 
> Basically SimplePipeline.runPipeline does (with a few details left out):
> 
> aae = createEngine(aed, aed, aed...)
> for (cas : createReader(crd) {
>  aae.process(cas);
> }
> 
> I may have an idea why the first case does not work. Does the AAE
> define the flag "outputsNewCases" (org.apache.uima.resource.metadata.OperationalProperties)?
> 
>  /**
>   * Sets whether this AnalysisEngine may output new CASes. If this property is set to
true, an
>   * application can use the {@link AnalysisEngine#processAndOutputNewCASes(CAS)} to pass
a CAS to
>   * this this AnalysisEngine and then step through all of the output CASes that it produces.
For
>   * example, such an AnalysisEngine could segment a CAS into smaller pieces, emitting
each as a
>   * separate CAS.
>   * 
>   * @param aOutputsNewCASes
>   *          true if this component may output new CASes, false if it does not
>   */
>  public void setOutputsNewCASes(boolean aOutputsNewCASes);
> 
> uimaFIT doesn't do that, you'd have to do that manually just as you also tweak the flow.

Correct: On the last step of the first AAE (a CAS merger) I have set this flag to true, so
that the merged CAS gets output (and the CASes feeding into the Merger get dropped, as per
the FC). 

So, you mean that this setting is ignored by uimaFit when applying the SimplePipeline? That
would explain why the correct output is missing. 

Cheers, 

Martin
 


> 
> Maybe there could be some way to infer this setting by detecting that a CAS multipler
> is inside an AAE... but then again, probably UIMA core should infer that, not uimaFIT.
> 
> Cheers,
> 
> -- Richard


Mime
View raw message