uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swirl (JIRA)" <...@uima.apache.org>
Subject [jira] [Updated] (UIMA-3597) CollectionReader and Annotators not having access to the same ExternalResource instance
Date Thu, 06 Feb 2014 10:02:10 GMT

     [ https://issues.apache.org/jira/browse/UIMA-3597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Swirl updated UIMA-3597:
------------------------

    Description: 
Creating a pipeline as follows:
a. CollectionReader
b. AnnotatorA
c. AnnotatorB

All the above (including the CollectionReader and the 2 annotators) have a 
dependency on an ExternalResource.

Here's a shortened code that I used:
// create the external resource desc 
ExternalResourceDescription myExternalResourceDesc = 
createExternalResourceDescription();

// create the CollectionReaderDescription, with the external resource desc
CollectionReaderDescription myCollectionReaderDesc = 
createDescription(myExternalResourceDesc);

// create the MyAnnotatorA desc, with the external resource desc 
AnalysisEngineDescription myAnnotatorADesc = 
createPrimitiveDescription(myExternalResourceDesc);

// create the MyAnnotatorB desc, with the external resource desc 
AnalysisEngineDescription myAnnotatorBDesc = 
createPrimitiveDescription(myExternalResourceDesc);

// run 
SimplePipeline.runPipeline(myCollectionReaderDesc, myAnnotatorADesc,				
myAnnotatorBDesc);

In the initialize(UimaContext context) method of collection reader and 
annotator, I print out the instance of the ExternalResource:
MyCollectionReader:com.example.MyExternalResource <at> 26a7dd39
MyAnnotatorA:com.example.MyExternalResource <at> 6ee1dac2
MyAnnotatorB:com.example.MyExternalResource <at> 6ee1dac2

As you can see, MyAnnotatorA and MyAnnotatorB got the same instance of the 
ExternalResource, but MyCollectionReader got a different instance.

They should be accessing the same ExternalResource instance.

  was:
Creating a pipeline as follows:
a. CollectionReader
b. AnnotatorA
c. AnnotatorB

All the above (including the CollectionReader and the 2 annotators) have a 
dependency on an ExternalResource.

Here's a shortened code that I used:
// create the external resource desc 
ExternalResourceDescription myExternalResourceDesc = 
createExternalResourceDescription();

// create the CollectionReaderDescription, with the external resource desc
CollectionReaderDescription myCollectionReaderDesc = 
createDescription(myExternalResourceDesc);

// create the MyAnnotatorA desc, with the external resource desc 
AnalysisEngineDescription myAnnotatorADesc = 
createPrimitiveDescription(myExternalResourceDesc);

// create the MyAnnotatorB desc, with the external resource desc 
AnalysisEngineDescription myAnnotatorBDesc = 
createPrimitiveDescription(myExternalResourceDesc);

// run 
SimplePipeline.runPipeline(myCollectionReaderDesc, myAnnotatorADesc,				
myAnnotatorBDesc);

In the initialize(UimaContext context) method of collection reader and 
annotator, I print out the instance of the ExternalResource:
MyCollectionReader:com.example.MyExternalResource <at> 26a7dd39
MyAnnotatorA:com.example.MyExternalResource <at> 6ee1dac2
MyAnnotatorB:com.example.MyExternalResource <at> 6ee1dac2

As you can see, MyAnnotatorA and MyAnnotatorB got the same instance of the 
ExternalResource, but MyCollectionReader got a different instance.

They should have access to the same ExternalResource instance.


> CollectionReader and Annotators not having access to the same ExternalResource instance

> ----------------------------------------------------------------------------------------
>
>                 Key: UIMA-3597
>                 URL: https://issues.apache.org/jira/browse/UIMA-3597
>             Project: UIMA
>          Issue Type: Bug
>    Affects Versions: 2.0.0uimaFIT
>            Reporter: Swirl
>            Priority: Minor
>
> Creating a pipeline as follows:
> a. CollectionReader
> b. AnnotatorA
> c. AnnotatorB
> All the above (including the CollectionReader and the 2 annotators) have a 
> dependency on an ExternalResource.
> Here's a shortened code that I used:
> // create the external resource desc 
> ExternalResourceDescription myExternalResourceDesc = 
> createExternalResourceDescription();
> // create the CollectionReaderDescription, with the external resource desc
> CollectionReaderDescription myCollectionReaderDesc = 
> createDescription(myExternalResourceDesc);
> // create the MyAnnotatorA desc, with the external resource desc 
> AnalysisEngineDescription myAnnotatorADesc = 
> createPrimitiveDescription(myExternalResourceDesc);
> // create the MyAnnotatorB desc, with the external resource desc 
> AnalysisEngineDescription myAnnotatorBDesc = 
> createPrimitiveDescription(myExternalResourceDesc);
> // run 
> SimplePipeline.runPipeline(myCollectionReaderDesc, myAnnotatorADesc,				
> myAnnotatorBDesc);
> In the initialize(UimaContext context) method of collection reader and 
> annotator, I print out the instance of the ExternalResource:
> MyCollectionReader:com.example.MyExternalResource <at> 26a7dd39
> MyAnnotatorA:com.example.MyExternalResource <at> 6ee1dac2
> MyAnnotatorB:com.example.MyExternalResource <at> 6ee1dac2
> As you can see, MyAnnotatorA and MyAnnotatorB got the same instance of the 
> ExternalResource, but MyCollectionReader got a different instance.
> They should be accessing the same ExternalResource instance.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message