You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Ba...@fr.thalesgroup.com on 2008/10/07 15:42:07 UTC

Imports with '_pear.xml' in aggregate prevent annotators to work on the right Sofa

Hi, 

 

I have to integrate 2 annotators in an aggregate, the first creates a new
Sofa and the second work on this created Sofa. 

 

My problem is that when I use the Annotators descriptors in the imports
everything works, but when I specify the '_pear.xml' descriptors the second
annotator continue to work on the 'DEFAULT' Sofa. 

 

For example with this descriptor my second annotator (InfomagicXipFrench)
annotates the Sofa 'txt' : 

 

<?xml version="1.0" encoding="UTF-8"?>

<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">

  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>

  <primitive>false</primitive>

  <delegateAnalysisEngineSpecifiers>

    <delegateAnalysisEngine key="XmlStripAnnotator">

      <import
location="../../XmlStripAnnotator/XmlStripAnnotator_pear.xml"/>

    </delegateAnalysisEngine>

    <delegateAnalysisEngine key="InfomagicXipFrench">

      <import
location="../../InfomagicXipFrench/desc/InfomagicXipFrench.xml"/>

    </delegateAnalysisEngine>

  </delegateAnalysisEngineSpecifiers>

  <analysisEngineMetaData>

    <name>AggregateXeroxIGM</name>

    <description/>

    <version>1.0</version>

    <vendor/>

    <configurationParameters searchStrategy="language_fallback"/>

    <configurationParameterSettings/>

    <flowConstraints>

      <fixedFlow>

        <node>XmlStripAnnotator</node>

        <node>InfomagicXipFrench</node>

      </fixedFlow>

    </flowConstraints>

    <typePriorities/>

    <fsIndexCollection/>

    <capabilities>

      <capability>

        <inputs/>

        <outputs/>

        <outputSofas>

          <sofaName>txt</sofaName>

        </outputSofas>

        <languagesSupported/>

      </capability>

    </capabilities>

    <operationalProperties>

      <modifiesCas>true</modifiesCas>

      <multipleDeploymentAllowed>false</multipleDeploymentAllowed>

      <outputsNewCASes>false</outputsNewCASes>

    </operationalProperties>

  </analysisEngineMetaData>

  <resourceManagerConfiguration/>

  <sofaMappings>

            <sofaMapping>

      <componentKey>XmlStripAnnotator</componentKey>

      <componentSofaName>txt</componentSofaName>

      <aggregateSofaName>txt</aggregateSofaName>

    </sofaMapping>

    <sofaMapping>

      <componentKey>InfomagicXipFrench</componentKey>

      <aggregateSofaName>txt</aggregateSofaName>

    </sofaMapping>

  </sofaMappings>

</analysisEngineDescription>

 

But when I use this import : 

<delegateAnalysisEngine key="InfomagicXipFrench">

      <import
location="../../InfomagicXipFrench/InfomagicXipFrench_pear.xml"/>

    </delegateAnalysisEngine>

 

Instead of 

<delegateAnalysisEngine key="InfomagicXipFrench">

      <import
location="../../InfomagicXipFrench/desc/InfomagicXipFrench.xml"/>

    </delegateAnalysisEngine>

 

The annotator works only on the 'DEFAULT' Sofa. 

 

This is very problematic because UIMA does not built the correct CLASSPATH
when I use the import based on
"../../InfomagicXipFrench/desc/InfomagicXipFrench.xml". As I have to
integrate other annotators (with a lot of JAR dependencies) I must use the
'_pear.xml' descriptor. 

 

Do you know how can I force my annotators to use the right Sofa using
'_pear.xml' imports in my aggregate ? 

 

Thanks, 

 

Baptiste GAILLARD.

 


RE: Imports with '_pear.xml' in aggregate prevent annotators to work on the right Sofa

Posted by Baptiste Gaillard <b_...@hotmail.com>.
Hi, 

I'm currently using the SVN version: https://svn.apache.org/repos/asf/incubator/uima/uimaj/trunk

I've updated my sources yesterday, but the bug seams still here. 

Thanks, 

Baptiste. 


----------------------------------------
> Date: Thu, 16 Oct 2008 17:01:37 -0400
> From: msa@schor.com
> To: uima-user@incubator.apache.org
> Subject: Re: Imports with '_pear.xml' in aggregate prevent annotators to work 	on the right Sofa
> 
> Hi -
> 
> The jira for this says it's fixed in the 2.3 version, which has not yet
> been released.
> 
> Can you describe what version of UIMA you were testing with?
> 
> -Marshall
> 
> 
> 
> Baptiste Gaillard wrote:
>> Hi, 
>>
>> As Aaron said in his previous message the problem should have been fixed : 
>>
>> https://issues.apache.org/jira/browse/UIMA-1107 
>>
>> But I tested again my aggregate,  Aaron too. 
>> We found that the BUG appears again now. 
>>
>> Because I absolutely need to fix this BUG I tried to debug a very simple workflow which integrate an aggregate. 
>>
>> I am in the same situation , I integrate 2 annotators in an aggregate, the first creates a new Sofa and the second works on this created Sofa. 
>>
>> I found that when the two annotators of my aggregate are declared using the '_pear.xml' descriptor, in the second annotator the CAS has a 'mSofaMappings' (in fact JCasImpl.casImpl.svd.componentInfo.mSofaMappings) member empty (but it should not !). 
>>
>> componentInfo is of type RootUimaContext_Impl
>>
>> When the second annotator is declared with the component descriptor (not the '_pear.xml' one) the 'mSofaMappings' contains {_InitialView=MY_PRODUCED_SOFA}, so it seams right in this case. 
>>
>> I search during hours to find why this 'mSofaMappings' is empty without success. 
>>
>> So, could you give me clues to help me find the problem ? What could be the responsible classes ? 
>>
>> If you want I cant send you my simple workflow to test that thing. 
>>
>> Thanks for your help,  
>>
>> Baptiste
>>
>>
>> ----------------------------------------
>>   
>>> Date: Tue, 7 Oct 2008 16:53:08 +0200
>>> From: Aaron.Kaplan@xrce.xerox.com
>>> To: uima-user@incubator.apache.org
>>> Subject: Re: Imports with '_pear.xml' in aggregate prevent annotators to work 	on the right Sofa
>>>
>>> Baptiste,
>>>
>>> This issue has been fixed in SVN, and the fix will be in the next release.
>>>
>>> https://issues.apache.org/jira/browse/UIMA-1107
>>>
>>> -Aaron
>>>
>>>
>>> Baptiste.GAILLARD@fr.thalesgroup.com wrote:
>>>     
>>>> Hi, 
>>>>
>>>>  
>>>>
>>>> I have to integrate 2 annotators in an aggregate, the first creates a new
>>>> Sofa and the second work on this created Sofa. 
>>>>
>>>>  
>>>>
>>>> My problem is that when I use the Annotators descriptors in the imports
>>>> everything works, but when I specify the '_pear.xml' descriptors the second
>>>> annotator continue to work on the 'DEFAULT' Sofa. 
>>>>
>>>>  
>>>>
>>>> For example with this descriptor my second annotator (InfomagicXipFrench)
>>>> annotates the Sofa 'txt' : 
>>>>
>>>>  
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>   org.apache.uima.java
>>>>
>>>>   false
>>>>
>>>>   
>>>>
>>>>     
>>>>
>>>>      > location="../../XmlStripAnnotator/XmlStripAnnotator_pear.xml"/>
>>>>
>>>>     
>>>>
>>>>     
>>>>
>>>>      > location="../../InfomagicXipFrench/desc/InfomagicXipFrench.xml"/>
>>>>
>>>>     
>>>>
>>>>   
>>>>
>>>>   
>>>>
>>>>     AggregateXeroxIGM
>>>>
>>>>     
>>>>
>>>>     1.0
>>>>
>>>>     
>>>>
>>>>     
>>>>
>>>>     
>>>>
>>>>     
>>>>
>>>>       
>>>>
>>>>         XmlStripAnnotator
>>>>
>>>>         InfomagicXipFrench
>>>>
>>>>       
>>>>
>>>>     
>>>>
>>>>     
>>>>
>>>>     
>>>>
>>>>     
>>>>
>>>>       
>>>>
>>>>         
>>>>
>>>>         
>>>>
>>>>         
>>>>
>>>>           txt
>>>>
>>>>         
>>>>
>>>>         
>>>>
>>>>       
>>>>
>>>>     
>>>>
>>>>     
>>>>
>>>>       true
>>>>
>>>>       false
>>>>
>>>>       false
>>>>
>>>>     
>>>>
>>>>   
>>>>
>>>>   
>>>>
>>>>   
>>>>
>>>>             
>>>>
>>>>       XmlStripAnnotator
>>>>
>>>>       txt
>>>>
>>>>       txt
>>>>
>>>>     
>>>>
>>>>     
>>>>
>>>>       InfomagicXipFrench
>>>>
>>>>       txt
>>>>
>>>>     
>>>>
>>>>   
>>>>
>>>>
>>>>
>>>>  
>>>>
>>>> But when I use this import : 
>>>>
>>>>
>>>>
>>>>      > location="../../InfomagicXipFrench/InfomagicXipFrench_pear.xml"/>
>>>>
>>>>     
>>>>
>>>>  
>>>>
>>>> Instead of 
>>>>
>>>>
>>>>
>>>>      > location="../../InfomagicXipFrench/desc/InfomagicXipFrench.xml"/>
>>>>
>>>>     
>>>>
>>>>  
>>>>
>>>> The annotator works only on the 'DEFAULT' Sofa. 
>>>>
>>>>  
>>>>
>>>> This is very problematic because UIMA does not built the correct CLASSPATH
>>>> when I use the import based on
>>>> "../../InfomagicXipFrench/desc/InfomagicXipFrench.xml". As I have to
>>>> integrate other annotators (with a lot of JAR dependencies) I must use the
>>>> '_pear.xml' descriptor. 
>>>>
>>>>  
>>>>
>>>> Do you know how can I force my annotators to use the right Sofa using
>>>> '_pear.xml' imports in my aggregate ? 
>>>>
>>>>  
>>>>
>>>> Thanks, 
>>>>
>>>>  
>>>>
>>>> Baptiste GAILLARD.
>>>>
>>>>  
>>>>
>>>>
>>>>       
>>
>> _________________________________________________________________
>> Téléphonez gratuitement à tous vos proches avec Windows Live Messenger  !  Téléchargez-le maintenant !
>> http://www.windowslive.fr/messenger/1.asp
>>
>>   

_________________________________________________________________
Téléphonez gratuitement à tous vos proches avec Windows Live Messenger  !  Téléchargez-le maintenant !
http://www.windowslive.fr/messenger/1.asp

Re: Imports with '_pear.xml' in aggregate prevent annotators to work on the right Sofa

Posted by Marshall Schor <ms...@schor.com>.
Hi -

The jira for this says it's fixed in the 2.3 version, which has not yet
been released.

Can you describe what version of UIMA you were testing with?

-Marshall



Baptiste Gaillard wrote:
> Hi, 
>
> As Aaron said in his previous message the problem should have been fixed : 
>
> https://issues.apache.org/jira/browse/UIMA-1107 
>
> But I tested again my aggregate,  Aaron too. 
> We found that the BUG appears again now. 
>
> Because I absolutely need to fix this BUG I tried to debug a very simple workflow which integrate an aggregate. 
>
> I am in the same situation , I integrate 2 annotators in an aggregate, the first creates a new Sofa and the second works on this created Sofa. 
>
> I found that when the two annotators of my aggregate are declared using the '_pear.xml' descriptor, in the second annotator the CAS has a 'mSofaMappings' (in fact JCasImpl.casImpl.svd.componentInfo.mSofaMappings) member empty (but it should not !). 
>
> componentInfo is of type RootUimaContext_Impl
>
> When the second annotator is declared with the component descriptor (not the '_pear.xml' one) the 'mSofaMappings' contains {_InitialView=MY_PRODUCED_SOFA}, so it seams right in this case. 
>
> I search during hours to find why this 'mSofaMappings' is empty without success. 
>
> So, could you give me clues to help me find the problem ? What could be the responsible classes ? 
>
> If you want I cant send you my simple workflow to test that thing. 
>
> Thanks for your help,  
>
> Baptiste
>
>
> ----------------------------------------
>   
>> Date: Tue, 7 Oct 2008 16:53:08 +0200
>> From: Aaron.Kaplan@xrce.xerox.com
>> To: uima-user@incubator.apache.org
>> Subject: Re: Imports with '_pear.xml' in aggregate prevent annotators to work 	on the right Sofa
>>
>> Baptiste,
>>
>> This issue has been fixed in SVN, and the fix will be in the next release.
>>
>> https://issues.apache.org/jira/browse/UIMA-1107
>>
>> -Aaron
>>
>>
>> Baptiste.GAILLARD@fr.thalesgroup.com wrote:
>>     
>>> Hi, 
>>>
>>>  
>>>
>>> I have to integrate 2 annotators in an aggregate, the first creates a new
>>> Sofa and the second work on this created Sofa. 
>>>
>>>  
>>>
>>> My problem is that when I use the Annotators descriptors in the imports
>>> everything works, but when I specify the '_pear.xml' descriptors the second
>>> annotator continue to work on the 'DEFAULT' Sofa. 
>>>
>>>  
>>>
>>> For example with this descriptor my second annotator (InfomagicXipFrench)
>>> annotates the Sofa 'txt' : 
>>>
>>>  
>>>
>>>
>>>
>>>
>>>
>>>   org.apache.uima.java
>>>
>>>   false
>>>
>>>   
>>>
>>>     
>>>
>>>       > location="../../XmlStripAnnotator/XmlStripAnnotator_pear.xml"/>
>>>
>>>     
>>>
>>>     
>>>
>>>       > location="../../InfomagicXipFrench/desc/InfomagicXipFrench.xml"/>
>>>
>>>     
>>>
>>>   
>>>
>>>   
>>>
>>>     AggregateXeroxIGM
>>>
>>>     
>>>
>>>     1.0
>>>
>>>     
>>>
>>>     
>>>
>>>     
>>>
>>>     
>>>
>>>       
>>>
>>>         XmlStripAnnotator
>>>
>>>         InfomagicXipFrench
>>>
>>>       
>>>
>>>     
>>>
>>>     
>>>
>>>     
>>>
>>>     
>>>
>>>       
>>>
>>>         
>>>
>>>         
>>>
>>>         
>>>
>>>           txt
>>>
>>>         
>>>
>>>         
>>>
>>>       
>>>
>>>     
>>>
>>>     
>>>
>>>       true
>>>
>>>       false
>>>
>>>       false
>>>
>>>     
>>>
>>>   
>>>
>>>   
>>>
>>>   
>>>
>>>             
>>>
>>>       XmlStripAnnotator
>>>
>>>       txt
>>>
>>>       txt
>>>
>>>     
>>>
>>>     
>>>
>>>       InfomagicXipFrench
>>>
>>>       txt
>>>
>>>     
>>>
>>>   
>>>
>>>
>>>
>>>  
>>>
>>> But when I use this import : 
>>>
>>>
>>>
>>>       > location="../../InfomagicXipFrench/InfomagicXipFrench_pear.xml"/>
>>>
>>>     
>>>
>>>  
>>>
>>> Instead of 
>>>
>>>
>>>
>>>       > location="../../InfomagicXipFrench/desc/InfomagicXipFrench.xml"/>
>>>
>>>     
>>>
>>>  
>>>
>>> The annotator works only on the 'DEFAULT' Sofa. 
>>>
>>>  
>>>
>>> This is very problematic because UIMA does not built the correct CLASSPATH
>>> when I use the import based on
>>> "../../InfomagicXipFrench/desc/InfomagicXipFrench.xml". As I have to
>>> integrate other annotators (with a lot of JAR dependencies) I must use the
>>> '_pear.xml' descriptor. 
>>>
>>>  
>>>
>>> Do you know how can I force my annotators to use the right Sofa using
>>> '_pear.xml' imports in my aggregate ? 
>>>
>>>  
>>>
>>> Thanks, 
>>>
>>>  
>>>
>>> Baptiste GAILLARD.
>>>
>>>  
>>>
>>>
>>>       
>
> _________________________________________________________________
> Téléphonez gratuitement à tous vos proches avec Windows Live Messenger  !  Téléchargez-le maintenant !
> http://www.windowslive.fr/messenger/1.asp
>
>   

RE: Imports with '_pear.xml' in aggregate prevent annotators to work on the right Sofa

Posted by Baptiste Gaillard <b_...@hotmail.com>.
Hi Eddie, 

First, thanks a lot to be so reactive to help us solve our problem. 
Sorry to give you a response so late, I had a lot of work... 

To bypass the problem I've changed the code of an annotator to make it work on the right Sofa "txt" (in our case the aggregate was used to make work the annotators on a new Sofa) : 

JCas casTxt = null;          

try {
    casTxt = aJCas.getView("txt");
} catch (CASException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}


The other anotators of the aggregate are used without the PEAR descriptor, their dependencies are symply added on the JVM's classpath (hopefully it worked, no class conflicts appears). 

I think your idea to create an aggregate to wrap the PEAR component and make it use the right Sofa is good. 
For the moment I do not need to do that because I solved the problem using an other workaround. But, I think your solution is better because the code of the annotators isn't modified. As I do not have access to the code of the annotator perhaps i'll need to use your solution soon. I keep you informed if this work or not. 

Regards, 

Baptiste


> Date: Tue, 11 Nov 2008 17:52:57 -0500
> From: eaepstein@gmail.com
> To: uima-user@incubator.apache.org
> Subject: Re: Imports with '_pear.xml' in aggregate prevent annotators to work on the right Sofa
> 
> Hi Aaron and Baptiste,
> 
> The original fix did enable sofamappings, but it broke other things.
> The fix for those re-broke sofamappings. (pie-on-face-icon)
> 
> After studying the code some more, there are other things broken
> when running a pear component as a delegate, for example,
> configuration parameter overrides. These things were simply
> not considered when creating the pear wrapper. We'll create
> a new issue detailing the problems and then figure out the priority.
> 
> As a workaround, it should be possible to make the pear
> component an aggregate and put the sofa mappings in
> that descriptor. Will that work for you?
> 
> Regards,
> Eddie
> 
> On Thu, Nov 6, 2008 at 12:41 PM, Aaron Kaplan
> <Aa...@xrce.xerox.com> wrote:
> > Eddie,
> >
> > (Baptiste's problem and mine are the same--we're working together.)
> >
> > I tried your first example and I can't even get that to work using the pear
> > descriptor and the trunk version of uima-core.  No need to go to the second,
> > more complicated version with two annotators and three views.  The aggregate
> > descriptor I wrote when following your test case instructions is below.  Do
> > you see anything wrong?
> >
> > I put a breakpoint at the line in PearAnalysisEngineWrapper.java  where
> > produceAnalysisEngine() is called.  The breakpoint is reached twice, and the
> > argument clonedAdditionalParameters has the following values:
> >
> > First time:
> >
> > {PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME=Aggregate,
> > CONFIG_PARAM_SETTINGS=org.apache.uima.resource.metadata.impl.ConfigurationParameterSettings_impl:
> > parameterSettings = Array{}
> >
> > settingsForGroups = {}
> > }
> >
> >
> > Second time:
> >
> > {PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME=Aggregate,
> > RESOURCE_MANAGER=org.apache.uima.resource.impl.ResourceManager_impl@a3ce3f,
> > CONFIG_PARAM_SETTINGS=org.apache.uima.resource.metadata.impl.ConfigurationParameterSettings_impl:
> > parameterSettings = Array{}
> >
> > settingsForGroups = {}
> > }
> >
> >
> > -Aaron
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
> >  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
> >  <primitive>false</primitive>
> >  <delegateAnalysisEngineSpecifiers>
> >    <delegateAnalysisEngine key="SofaExampleAnnotator">
> >      <import
> > location="/home/akaplan/uima/installtest/1107test/1107test_pear.xml"/>
> >    </delegateAnalysisEngine>
> >  </delegateAnalysisEngineSpecifiers>
> >  <analysisEngineMetaData>
> >    <name>Aggregate</name>
> >    <description/>
> >    <version>1.0</version>
> >    <vendor/>
> >    <configurationParameters/>
> >    <configurationParameterSettings/>
> >    <flowConstraints>
> >      <fixedFlow>
> >        <node>SofaExampleAnnotator</node>
> >      </fixedFlow>
> >    </flowConstraints>
> >    <fsIndexCollection/>
> >    <capabilities>
> >      <capability>
> >        <inputs/>
> >        <outputs/>
> >        <inputSofas>
> >          <sofaName>_InitialView</sofaName>
> >        </inputSofas>
> >        <outputSofas>
> >          <sofaName>GermanView</sofaName>
> >        </outputSofas>
> >        <languagesSupported/>
> >      </capability>
> >    </capabilities>
> >    <operationalProperties>
> >      <modifiesCas>true</modifiesCas>
> >      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
> >      <outputsNewCASes>false</outputsNewCASes>
> >    </operationalProperties>
> >  </analysisEngineMetaData>
> >  <resourceManagerConfiguration/>
> >  <sofaMappings>
> >    <sofaMapping>
> >      <componentKey>SofaExampleAnnotator</componentKey>
> >      <componentSofaName>EnglishDocument</componentSofaName>
> >      <aggregateSofaName>_InitialView</aggregateSofaName>
> >    </sofaMapping>
> >    <sofaMapping>
> >      <componentKey>SofaExampleAnnotator</componentKey>
> >      <componentSofaName>GermanDocument</componentSofaName>
> >      <aggregateSofaName>GermanView</aggregateSofaName>
> >    </sofaMapping>
> >  </sofaMappings>
> > </analysisEngineDescription>
> >
> >
> > Eddie Epstein wrote:
> >>
> >> Hi Baptiste,
> >>
> >> I'm having a problem recreating the problem. Maybe I don't understand the
> >> scenario correctly. Here's what I did initially to debug the problem:
> >>
> >> 1. create an eclipse workspace with the uimaj-examples project.
> >> 2. create a second project with just the SofaExampleAnnotator source
> >> and descriptor.
> >> 3. Create a pear file with the SofaExampleAnnotator source and descriptor
> >> 4. create an aggregate descriptor in the new project that wraps either the
> >>    SofaExampleAnnotator or the pear file, and declares Sofa mapping
> >>    to map _InitialView into EnglishDocument
> >> 5. run the aggregate using CVD
> >>
> >> Using the 2.2.2 release, the aggregate wrapping SofaExampleAnnotator
> >> works,
> >> but it fails when wrapping the pear file.
> >>
> >> To fix the pear problem, I imported uimaj-core as a new project in the
> >> workspace
> >> and modified the code (1107 fix). Then, I modified the CVD run
> >> configuration to
> >> include the uimaj-core project in the front. This worked, and continues to
> >> work
> >> for me using the latest uimaj-core from the trunk.
> >

_________________________________________________________________
Inédit ! Des Emoticônes Déjantées! Installez les dans votre Messenger ! 
http://www.ilovemessenger.fr/Emoticones/EmoticonesDejantees.aspx

Re: Imports with '_pear.xml' in aggregate prevent annotators to work on the right Sofa

Posted by Eddie Epstein <ea...@gmail.com>.
Hi Aaron and Baptiste,

The original fix did enable sofamappings, but it broke other things.
The fix for those re-broke sofamappings. (pie-on-face-icon)

After studying the code some more, there are other things broken
when running a pear component as a delegate, for example,
configuration parameter overrides. These things were simply
not considered when creating the pear wrapper. We'll create
a new issue detailing the problems and then figure out the priority.

As a workaround, it should be possible to make the pear
component an aggregate and put the sofa mappings in
that descriptor. Will that work for you?

Regards,
Eddie

On Thu, Nov 6, 2008 at 12:41 PM, Aaron Kaplan
<Aa...@xrce.xerox.com> wrote:
> Eddie,
>
> (Baptiste's problem and mine are the same--we're working together.)
>
> I tried your first example and I can't even get that to work using the pear
> descriptor and the trunk version of uima-core.  No need to go to the second,
> more complicated version with two annotators and three views.  The aggregate
> descriptor I wrote when following your test case instructions is below.  Do
> you see anything wrong?
>
> I put a breakpoint at the line in PearAnalysisEngineWrapper.java  where
> produceAnalysisEngine() is called.  The breakpoint is reached twice, and the
> argument clonedAdditionalParameters has the following values:
>
> First time:
>
> {PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME=Aggregate,
> CONFIG_PARAM_SETTINGS=org.apache.uima.resource.metadata.impl.ConfigurationParameterSettings_impl:
> parameterSettings = Array{}
>
> settingsForGroups = {}
> }
>
>
> Second time:
>
> {PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME=Aggregate,
> RESOURCE_MANAGER=org.apache.uima.resource.impl.ResourceManager_impl@a3ce3f,
> CONFIG_PARAM_SETTINGS=org.apache.uima.resource.metadata.impl.ConfigurationParameterSettings_impl:
> parameterSettings = Array{}
>
> settingsForGroups = {}
> }
>
>
> -Aaron
>
> <?xml version="1.0" encoding="UTF-8"?>
> <analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
>  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
>  <primitive>false</primitive>
>  <delegateAnalysisEngineSpecifiers>
>    <delegateAnalysisEngine key="SofaExampleAnnotator">
>      <import
> location="/home/akaplan/uima/installtest/1107test/1107test_pear.xml"/>
>    </delegateAnalysisEngine>
>  </delegateAnalysisEngineSpecifiers>
>  <analysisEngineMetaData>
>    <name>Aggregate</name>
>    <description/>
>    <version>1.0</version>
>    <vendor/>
>    <configurationParameters/>
>    <configurationParameterSettings/>
>    <flowConstraints>
>      <fixedFlow>
>        <node>SofaExampleAnnotator</node>
>      </fixedFlow>
>    </flowConstraints>
>    <fsIndexCollection/>
>    <capabilities>
>      <capability>
>        <inputs/>
>        <outputs/>
>        <inputSofas>
>          <sofaName>_InitialView</sofaName>
>        </inputSofas>
>        <outputSofas>
>          <sofaName>GermanView</sofaName>
>        </outputSofas>
>        <languagesSupported/>
>      </capability>
>    </capabilities>
>    <operationalProperties>
>      <modifiesCas>true</modifiesCas>
>      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
>      <outputsNewCASes>false</outputsNewCASes>
>    </operationalProperties>
>  </analysisEngineMetaData>
>  <resourceManagerConfiguration/>
>  <sofaMappings>
>    <sofaMapping>
>      <componentKey>SofaExampleAnnotator</componentKey>
>      <componentSofaName>EnglishDocument</componentSofaName>
>      <aggregateSofaName>_InitialView</aggregateSofaName>
>    </sofaMapping>
>    <sofaMapping>
>      <componentKey>SofaExampleAnnotator</componentKey>
>      <componentSofaName>GermanDocument</componentSofaName>
>      <aggregateSofaName>GermanView</aggregateSofaName>
>    </sofaMapping>
>  </sofaMappings>
> </analysisEngineDescription>
>
>
> Eddie Epstein wrote:
>>
>> Hi Baptiste,
>>
>> I'm having a problem recreating the problem. Maybe I don't understand the
>> scenario correctly. Here's what I did initially to debug the problem:
>>
>> 1. create an eclipse workspace with the uimaj-examples project.
>> 2. create a second project with just the SofaExampleAnnotator source
>> and descriptor.
>> 3. Create a pear file with the SofaExampleAnnotator source and descriptor
>> 4. create an aggregate descriptor in the new project that wraps either the
>>    SofaExampleAnnotator or the pear file, and declares Sofa mapping
>>    to map _InitialView into EnglishDocument
>> 5. run the aggregate using CVD
>>
>> Using the 2.2.2 release, the aggregate wrapping SofaExampleAnnotator
>> works,
>> but it fails when wrapping the pear file.
>>
>> To fix the pear problem, I imported uimaj-core as a new project in the
>> workspace
>> and modified the code (1107 fix). Then, I modified the CVD run
>> configuration to
>> include the uimaj-core project in the front. This worked, and continues to
>> work
>> for me using the latest uimaj-core from the trunk.
>

Re: Imports with '_pear.xml' in aggregate prevent annotators to work on the right Sofa

Posted by Aaron Kaplan <Aa...@xrce.xerox.com>.
Eddie,

(Baptiste's problem and mine are the same--we're working together.)

I tried your first example and I can't even get that to work using the 
pear descriptor and the trunk version of uima-core.  No need to go to 
the second, more complicated version with two annotators and three 
views.  The aggregate descriptor I wrote when following your test case 
instructions is below.  Do you see anything wrong?

I put a breakpoint at the line in PearAnalysisEngineWrapper.java  where 
produceAnalysisEngine() is called.  The breakpoint is reached twice, and 
the argument clonedAdditionalParameters has the following values:

First time:

{PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME=Aggregate, 
CONFIG_PARAM_SETTINGS=org.apache.uima.resource.metadata.impl.ConfigurationParameterSettings_impl: 

parameterSettings = Array{}

settingsForGroups = {}
}


Second time:

{PARAM_AGGREGATE_ANALYSIS_ENGINE_NAME=Aggregate, 
RESOURCE_MANAGER=org.apache.uima.resource.impl.ResourceManager_impl@a3ce3f, 
CONFIG_PARAM_SETTINGS=org.apache.uima.resource.metadata.impl.ConfigurationParameterSettings_impl: 

parameterSettings = Array{}

settingsForGroups = {}
}


-Aaron

<?xml version="1.0" encoding="UTF-8"?>
<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
   <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
   <primitive>false</primitive>
   <delegateAnalysisEngineSpecifiers>
     <delegateAnalysisEngine key="SofaExampleAnnotator">
       <import 
location="/home/akaplan/uima/installtest/1107test/1107test_pear.xml"/>
     </delegateAnalysisEngine>
   </delegateAnalysisEngineSpecifiers>
   <analysisEngineMetaData>
     <name>Aggregate</name>
     <description/>
     <version>1.0</version>
     <vendor/>
     <configurationParameters/>
     <configurationParameterSettings/>
     <flowConstraints>
       <fixedFlow>
         <node>SofaExampleAnnotator</node>
       </fixedFlow>
     </flowConstraints>
     <fsIndexCollection/>
     <capabilities>
       <capability>
         <inputs/>
         <outputs/>
         <inputSofas>
           <sofaName>_InitialView</sofaName>
         </inputSofas>
         <outputSofas>
           <sofaName>GermanView</sofaName>
         </outputSofas>
         <languagesSupported/>
       </capability>
     </capabilities>
     <operationalProperties>
       <modifiesCas>true</modifiesCas>
       <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
       <outputsNewCASes>false</outputsNewCASes>
     </operationalProperties>
   </analysisEngineMetaData>
   <resourceManagerConfiguration/>
   <sofaMappings>
     <sofaMapping>
       <componentKey>SofaExampleAnnotator</componentKey>
       <componentSofaName>EnglishDocument</componentSofaName>
       <aggregateSofaName>_InitialView</aggregateSofaName>
     </sofaMapping>
     <sofaMapping>
       <componentKey>SofaExampleAnnotator</componentKey>
       <componentSofaName>GermanDocument</componentSofaName>
       <aggregateSofaName>GermanView</aggregateSofaName>
     </sofaMapping>
   </sofaMappings>
</analysisEngineDescription>


Eddie Epstein wrote:
> Hi Baptiste,
> 
> I'm having a problem recreating the problem. Maybe I don't understand the
> scenario correctly. Here's what I did initially to debug the problem:
> 
> 1. create an eclipse workspace with the uimaj-examples project.
> 2. create a second project with just the SofaExampleAnnotator source
> and descriptor.
> 3. Create a pear file with the SofaExampleAnnotator source and descriptor
> 4. create an aggregate descriptor in the new project that wraps either the
>     SofaExampleAnnotator or the pear file, and declares Sofa mapping
>     to map _InitialView into EnglishDocument
> 5. run the aggregate using CVD
> 
> Using the 2.2.2 release, the aggregate wrapping SofaExampleAnnotator works,
> but it fails when wrapping the pear file.
> 
> To fix the pear problem, I imported uimaj-core as a new project in the workspace
> and modified the code (1107 fix). Then, I modified the CVD run configuration to
> include the uimaj-core project in the front. This worked, and continues to work
> for me using the latest uimaj-core from the trunk.

Re: Imports with '_pear.xml' in aggregate prevent annotators to work on the right Sofa

Posted by Eddie Epstein <ea...@gmail.com>.
Hi Baptiste,

I'm having a problem recreating the problem. Maybe I don't understand the
scenario correctly. Here's what I did initially to debug the problem:

1. create an eclipse workspace with the uimaj-examples project.
2. create a second project with just the SofaExampleAnnotator source
and descriptor.
3. Create a pear file with the SofaExampleAnnotator source and descriptor
4. create an aggregate descriptor in the new project that wraps either the
    SofaExampleAnnotator or the pear file, and declares Sofa mapping
    to map _InitialView into EnglishDocument
5. run the aggregate using CVD

Using the 2.2.2 release, the aggregate wrapping SofaExampleAnnotator works,
but it fails when wrapping the pear file.

To fix the pear problem, I imported uimaj-core as a new project in the workspace
and modified the code (1107 fix). Then, I modified the CVD run configuration to
include the uimaj-core project in the front. This worked, and continues to work
for me using the latest uimaj-core from the trunk.

To mimic your new scenario, I created a second aggregate that has two
delegates: first SofaExampleAnnotator and then the pear annotator.
Sofa mapping was set so that the first annotator read from _InitialView
and wrote to GarbageDocument, and the second annotator read from
GarbageDocument and wrote to GermanDocument. After running,
CVD showed the following view text:

_InitialView: this beer is good
GarbageDocument: das bier ist gut
GermanDocument: gut gut gut gut

Here is the aggregate descriptor:

<?xml version="1.0" encoding="UTF-8"?>
<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
  <primitive>false</primitive>
  <delegateAnalysisEngineSpecifiers>
    <delegateAnalysisEngine key="ProjectForPear_pear">
      <import location="../ProjectForPear/ProjectForPear_pear.xml"/>
    </delegateAnalysisEngine>
    <delegateAnalysisEngine key="SofaExampleAnnotator">
      <import location="../../uimaj-examples/descriptors/analysis_engine/SofaExampleAnnotator.xml"/>
    </delegateAnalysisEngine>
  </delegateAnalysisEngineSpecifiers>
  <analysisEngineMetaData>
    <name>SofaMapTestAggregate</name>
    <description/>
    <version>1.0</version>
    <vendor/>
    <configurationParameters/>
    <configurationParameterSettings/>
    <flowConstraints>
      <fixedFlow>
        <node>SofaExampleAnnotator</node>
        <node>ProjectForPear_pear</node>
      </fixedFlow>
    </flowConstraints>
    <fsIndexCollection/>
    <capabilities>
      <capability>
        <inputs/>
        <outputs/>
        <inputSofas>
          <sofaName>_InitialView</sofaName>
        </inputSofas>
        <outputSofas>
          <sofaName>GermanDocument</sofaName>
          <sofaName>GarbageDocument</sofaName>
        </outputSofas>
        <languagesSupported/>
      </capability>
    </capabilities>
    <operationalProperties>
      <modifiesCas>true</modifiesCas>
      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
      <outputsNewCASes>false</outputsNewCASes>
    </operationalProperties>
  </analysisEngineMetaData>
  <resourceManagerConfiguration/>
  <sofaMappings>
    <sofaMapping>
      <componentKey>SofaExampleAnnotator</componentKey>
      <componentSofaName>EnglishDocument</componentSofaName>
      <aggregateSofaName>_InitialView</aggregateSofaName>
    </sofaMapping>
    <sofaMapping>
      <componentKey>SofaExampleAnnotator</componentKey>
      <componentSofaName>GermanDocument</componentSofaName>
      <aggregateSofaName>GarbageDocument</aggregateSofaName>
    </sofaMapping>
    <sofaMapping>
      <componentKey>ProjectForPear_pear</componentKey>
      <componentSofaName>EnglishDocument</componentSofaName>
      <aggregateSofaName>GarbageDocument</aggregateSofaName>
    </sofaMapping>
    <sofaMapping>
      <componentKey>ProjectForPear_pear</componentKey>
      <componentSofaName>GermanDocument</componentSofaName>
      <aggregateSofaName>GermanDocument</aggregateSofaName>
    </sofaMapping>
  </sofaMappings>
</analysisEngineDescription>

Sorry to be slow getting to this issue. Regards,
Eddie


On Thu, Oct 16, 2008 at 3:01 PM, Baptiste Gaillard
<b_...@hotmail.com> wrote:
>
> Hi,
>
> As Aaron said in his previous message the problem should have been fixed :
>
> https://issues.apache.org/jira/browse/UIMA-1107
>
> But I tested again my aggregate,  Aaron too.
> We found that the BUG appears again now.
>
> Because I absolutely need to fix this BUG I tried to debug a very simple workflow which integrate an aggregate.
>
> I am in the same situation , I integrate 2 annotators in an aggregate, the first creates a new Sofa and the second works on this created Sofa.
>
> I found that when the two annotators of my aggregate are declared using the '_pear.xml' descriptor, in the second annotator the CAS has a 'mSofaMappings' (in fact JCasImpl.casImpl.svd.componentInfo.mSofaMappings) member empty (but it should not !).
>
> componentInfo is of type RootUimaContext_Impl
>
> When the second annotator is declared with the component descriptor (not the '_pear.xml' one) the 'mSofaMappings' contains {_InitialView=MY_PRODUCED_SOFA}, so it seams right in this case.
>
> I search during hours to find why this 'mSofaMappings' is empty without success.
>
> So, could you give me clues to help me find the problem ? What could be the responsible classes ?
>
> If you want I cant send you my simple workflow to test that thing.
>
> Thanks for your help,
>
> Baptiste
>
>

RE: Imports with '_pear.xml' in aggregate prevent annotators to work on the right Sofa

Posted by Baptiste Gaillard <b_...@hotmail.com>.
Hi, 

As Aaron said in his previous message the problem should have been fixed : 

https://issues.apache.org/jira/browse/UIMA-1107 

But I tested again my aggregate,  Aaron too. 
We found that the BUG appears again now. 

Because I absolutely need to fix this BUG I tried to debug a very simple workflow which integrate an aggregate. 

I am in the same situation , I integrate 2 annotators in an aggregate, the first creates a new Sofa and the second works on this created Sofa. 

I found that when the two annotators of my aggregate are declared using the '_pear.xml' descriptor, in the second annotator the CAS has a 'mSofaMappings' (in fact JCasImpl.casImpl.svd.componentInfo.mSofaMappings) member empty (but it should not !). 

componentInfo is of type RootUimaContext_Impl

When the second annotator is declared with the component descriptor (not the '_pear.xml' one) the 'mSofaMappings' contains {_InitialView=MY_PRODUCED_SOFA}, so it seams right in this case. 

I search during hours to find why this 'mSofaMappings' is empty without success. 

So, could you give me clues to help me find the problem ? What could be the responsible classes ? 

If you want I cant send you my simple workflow to test that thing. 

Thanks for your help,  

Baptiste


----------------------------------------
> Date: Tue, 7 Oct 2008 16:53:08 +0200
> From: Aaron.Kaplan@xrce.xerox.com
> To: uima-user@incubator.apache.org
> Subject: Re: Imports with '_pear.xml' in aggregate prevent annotators to work 	on the right Sofa
> 
> Baptiste,
> 
> This issue has been fixed in SVN, and the fix will be in the next release.
> 
> https://issues.apache.org/jira/browse/UIMA-1107
> 
> -Aaron
> 
> 
> Baptiste.GAILLARD@fr.thalesgroup.com wrote:
>> Hi, 
>> 
>>  
>> 
>> I have to integrate 2 annotators in an aggregate, the first creates a new
>> Sofa and the second work on this created Sofa. 
>> 
>>  
>> 
>> My problem is that when I use the Annotators descriptors in the imports
>> everything works, but when I specify the '_pear.xml' descriptors the second
>> annotator continue to work on the 'DEFAULT' Sofa. 
>> 
>>  
>> 
>> For example with this descriptor my second annotator (InfomagicXipFrench)
>> annotates the Sofa 'txt' : 
>> 
>>  
>> 
>> 
>> 
>> 
>> 
>>   org.apache.uima.java
>> 
>>   false
>> 
>>   
>> 
>>     
>> 
>>       > location="../../XmlStripAnnotator/XmlStripAnnotator_pear.xml"/>
>> 
>>     
>> 
>>     
>> 
>>       > location="../../InfomagicXipFrench/desc/InfomagicXipFrench.xml"/>
>> 
>>     
>> 
>>   
>> 
>>   
>> 
>>     AggregateXeroxIGM
>> 
>>     
>> 
>>     1.0
>> 
>>     
>> 
>>     
>> 
>>     
>> 
>>     
>> 
>>       
>> 
>>         XmlStripAnnotator
>> 
>>         InfomagicXipFrench
>> 
>>       
>> 
>>     
>> 
>>     
>> 
>>     
>> 
>>     
>> 
>>       
>> 
>>         
>> 
>>         
>> 
>>         
>> 
>>           txt
>> 
>>         
>> 
>>         
>> 
>>       
>> 
>>     
>> 
>>     
>> 
>>       true
>> 
>>       false
>> 
>>       false
>> 
>>     
>> 
>>   
>> 
>>   
>> 
>>   
>> 
>>             
>> 
>>       XmlStripAnnotator
>> 
>>       txt
>> 
>>       txt
>> 
>>     
>> 
>>     
>> 
>>       InfomagicXipFrench
>> 
>>       txt
>> 
>>     
>> 
>>   
>> 
>> 
>> 
>>  
>> 
>> But when I use this import : 
>> 
>> 
>> 
>>       > location="../../InfomagicXipFrench/InfomagicXipFrench_pear.xml"/>
>> 
>>     
>> 
>>  
>> 
>> Instead of 
>> 
>> 
>> 
>>       > location="../../InfomagicXipFrench/desc/InfomagicXipFrench.xml"/>
>> 
>>     
>> 
>>  
>> 
>> The annotator works only on the 'DEFAULT' Sofa. 
>> 
>>  
>> 
>> This is very problematic because UIMA does not built the correct CLASSPATH
>> when I use the import based on
>> "../../InfomagicXipFrench/desc/InfomagicXipFrench.xml". As I have to
>> integrate other annotators (with a lot of JAR dependencies) I must use the
>> '_pear.xml' descriptor. 
>> 
>>  
>> 
>> Do you know how can I force my annotators to use the right Sofa using
>> '_pear.xml' imports in my aggregate ? 
>> 
>>  
>> 
>> Thanks, 
>> 
>>  
>> 
>> Baptiste GAILLARD.
>> 
>>  
>> 
>> 
> 

_________________________________________________________________
Téléphonez gratuitement à tous vos proches avec Windows Live Messenger  !  Téléchargez-le maintenant !
http://www.windowslive.fr/messenger/1.asp

Re: Imports with '_pear.xml' in aggregate prevent annotators to work on the right Sofa

Posted by Aaron Kaplan <Aa...@xrce.xerox.com>.
Baptiste,

This issue has been fixed in SVN, and the fix will be in the next release.

https://issues.apache.org/jira/browse/UIMA-1107

-Aaron


Baptiste.GAILLARD@fr.thalesgroup.com wrote:
> Hi, 
> 
>  
> 
> I have to integrate 2 annotators in an aggregate, the first creates a new
> Sofa and the second work on this created Sofa. 
> 
>  
> 
> My problem is that when I use the Annotators descriptors in the imports
> everything works, but when I specify the '_pear.xml' descriptors the second
> annotator continue to work on the 'DEFAULT' Sofa. 
> 
>  
> 
> For example with this descriptor my second annotator (InfomagicXipFrench)
> annotates the Sofa 'txt' : 
> 
>  
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
> 
>   <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
> 
>   <primitive>false</primitive>
> 
>   <delegateAnalysisEngineSpecifiers>
> 
>     <delegateAnalysisEngine key="XmlStripAnnotator">
> 
>       <import
> location="../../XmlStripAnnotator/XmlStripAnnotator_pear.xml"/>
> 
>     </delegateAnalysisEngine>
> 
>     <delegateAnalysisEngine key="InfomagicXipFrench">
> 
>       <import
> location="../../InfomagicXipFrench/desc/InfomagicXipFrench.xml"/>
> 
>     </delegateAnalysisEngine>
> 
>   </delegateAnalysisEngineSpecifiers>
> 
>   <analysisEngineMetaData>
> 
>     <name>AggregateXeroxIGM</name>
> 
>     <description/>
> 
>     <version>1.0</version>
> 
>     <vendor/>
> 
>     <configurationParameters searchStrategy="language_fallback"/>
> 
>     <configurationParameterSettings/>
> 
>     <flowConstraints>
> 
>       <fixedFlow>
> 
>         <node>XmlStripAnnotator</node>
> 
>         <node>InfomagicXipFrench</node>
> 
>       </fixedFlow>
> 
>     </flowConstraints>
> 
>     <typePriorities/>
> 
>     <fsIndexCollection/>
> 
>     <capabilities>
> 
>       <capability>
> 
>         <inputs/>
> 
>         <outputs/>
> 
>         <outputSofas>
> 
>           <sofaName>txt</sofaName>
> 
>         </outputSofas>
> 
>         <languagesSupported/>
> 
>       </capability>
> 
>     </capabilities>
> 
>     <operationalProperties>
> 
>       <modifiesCas>true</modifiesCas>
> 
>       <multipleDeploymentAllowed>false</multipleDeploymentAllowed>
> 
>       <outputsNewCASes>false</outputsNewCASes>
> 
>     </operationalProperties>
> 
>   </analysisEngineMetaData>
> 
>   <resourceManagerConfiguration/>
> 
>   <sofaMappings>
> 
>             <sofaMapping>
> 
>       <componentKey>XmlStripAnnotator</componentKey>
> 
>       <componentSofaName>txt</componentSofaName>
> 
>       <aggregateSofaName>txt</aggregateSofaName>
> 
>     </sofaMapping>
> 
>     <sofaMapping>
> 
>       <componentKey>InfomagicXipFrench</componentKey>
> 
>       <aggregateSofaName>txt</aggregateSofaName>
> 
>     </sofaMapping>
> 
>   </sofaMappings>
> 
> </analysisEngineDescription>
> 
>  
> 
> But when I use this import : 
> 
> <delegateAnalysisEngine key="InfomagicXipFrench">
> 
>       <import
> location="../../InfomagicXipFrench/InfomagicXipFrench_pear.xml"/>
> 
>     </delegateAnalysisEngine>
> 
>  
> 
> Instead of 
> 
> <delegateAnalysisEngine key="InfomagicXipFrench">
> 
>       <import
> location="../../InfomagicXipFrench/desc/InfomagicXipFrench.xml"/>
> 
>     </delegateAnalysisEngine>
> 
>  
> 
> The annotator works only on the 'DEFAULT' Sofa. 
> 
>  
> 
> This is very problematic because UIMA does not built the correct CLASSPATH
> when I use the import based on
> "../../InfomagicXipFrench/desc/InfomagicXipFrench.xml". As I have to
> integrate other annotators (with a lot of JAR dependencies) I must use the
> '_pear.xml' descriptor. 
> 
>  
> 
> Do you know how can I force my annotators to use the right Sofa using
> '_pear.xml' imports in my aggregate ? 
> 
>  
> 
> Thanks, 
> 
>  
> 
> Baptiste GAILLARD.
> 
>  
> 
>