Michael Baessler | 1 Jul 14:20
Picon

Getting Started Guide: "Working With PEARs"

A new Getting Started Guide is available for UIMA users
that want to improve their knowledge about UIMA PEARs.

	Getting Started "Working With PEARs"

	http://incubator.apache.org/uima/doc-uima-pears.html

The guide should help users to understand what a UIMA PEAR package is,
how to generate them and how to use them within UIMA applications. It also
highlights the advantages of PEARs.

The UIMA Getting Started Guide series is available in the "Documentation"
section of the Apache UIMA website.

	http://incubator.apache.org/uima/documentation.html

-- Michael

Christoph Büscher | 1 Jul 16:44
Picon
Favicon

Questions about using a "customResourceSpecifier"

Hi,

I have a few questions about binding to external resources that are no file 
resources. The documentation mentions the option to use a 
"customResourceSpecifier" as described in

http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/references/references.html#ugr.ref.xml.component_descriptor.custom_resource_specifiers

I would like to use the resource mechanism to bind to an interface for read 
access to a database. The database connection parameters would be parameters in 
the "customResourceSpecifier".

I have a few questions concerning this.

1. How do I include a custom resource specifier in e.g. a CPEs resource binding? 
It's not exactly clear to me from the documentation, but I would try something like:

<externalResource>
       <name>MyDBResource</name>
       <description>a resource that provides read access to a database</description>
       <customResourceSpecifier>
	  pathToCustomresourceSpecifier/myCustomResourceSpecifier.xml
       </customResourceSpecifier>
</externalResource>
	
Can I find examples for the correct syntax here somewhere in the documentation?

2. The documentation mentions the implementation class must implement the 
"Resource" interface. Is there any existing implementation of "Resource" that is 
safe to extend to use in an external resource binding?
(Continue reading)

Roberto Franchini | 2 Jul 11:12
Picon
Gravatar

Cloning a CAS

Hi to all,
I'm developing a Segmenter for testing porpouse. At the end of our
pipeline, we want to serialize to disk the annotation created by each
annotators.
At the moment it doesn't work as I want :(
Let me explain the details.
To do that, each annotator "sign" the annotation it creates using a
feature called "annotatorId".
Now, in the segmeter, I'm able to extract, using constranints and
filtered iterator, the annotations created by each one:

//get le list of id:
		AnnotationIndex annotationIndex = jcas.getAnnotationIndex(Annotation.type);
		FSIterator iterator = annotationIndex.iterator();
		iterator.moveToFirst();
		Annotation current;
		Set<String> annotatorsIds = new TreeSet<String>();

		while (iterator.hasNext()) {

			current = (Annotation) iterator.next();
			annotatorsIds.add(current.getAnnoId());
		}

		CAS cas = jcas.getCas();
		Type type = cas.getTypeSystem().getType(Annotation.class.getName());
		FSIndex index = cas.getAnnotationIndex(type);

//get annnotaions for each annototar

(Continue reading)

Michael Baessler | 2 Jul 11:55
Picon

Re: Questions about using a "customResourceSpecifier"

Hi Christoph,

I think you mixed up two different concepts here, maybe the documentation is misleading.

So CustomResourceSpecifiers are mainly intended to be used if you want to create your own new UIMA
Resource in the sense of a UIMA component. So for example you may know that we have different UIMA
remote service protocols (SOAP, Vinci). If you now want to create a new service protocol based on
your own implementation you can implement that using the CustomResourceSpecifier approach. When
integrating this resource/component the UIMA framework can treat this similar to an analysis engine.
Such resource an for example be plugged in as delegate to an aggregate analysis engine.

I don't think that CustomResourceSpecifier can be integrated as externalResource to an analysis
engine. You may check the documentation for externalResoruces with a short example here:
http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.aae.accessing_external_resource_files
I think that what you are trying to do.

Another example for externalResources is available in the Tagger annotator in the Sandbox. This
annotator use an external resource for the model file (ModelResource).

Hope that helps.

-- Michael

Christoph Büscher wrote:
> Hi,
> 
> I have a few questions about binding to external resources that are no
> file resources. The documentation mentions the option to use a
> "customResourceSpecifier" as described in
> 
(Continue reading)

Daniel Truemper | 2 Jul 12:23
Picon
Favicon

RMI Blocking Collection Reader


Hi,

we have a strange problem concerning a blocking collection reader that
executes UIMA as a daemon. To be precise this reader registers itself
with an RMI server and waits for a simple callback with a new document
to process. At the end of the pipeline is a CasConsumer that itself
calls the RMI server upon finished jobs. This part of the application is
working.

When we are executing everything and try to process documents with the
UIMA "server" the following happens: the first document gets
successfully processed within out pipeline. In the meantime the reader
is already waiting for new documents to arrive. When the second document
arrives UIMA stops processing. In the logs we see a lot of
"ClassNotFoundException"s of classes that definitely are in the
classpath. Apart from this there is:

---snip--
01.07.2008 15:38:26 org.apache.uima.collection.impl.cpm.engine.CPMEngine
process
INFO: The collection reader thread state is: 1004 (Thread Name:
[CasConsumer Pipeline Thread]::)
01.07.2008 15:38:26 org.apache.uima.collection.impl.cpm.engine.CPMEngine
process
INFO: The CPM processing unit is 0 and processing state 2001. (Thread
Name: [CasConsumer Pipeline Thread]::)
01.07.2008 15:38:26 org.apache.uima.collection.impl.cpm.engine.CPMEngine
process
INFO: The CAS consumer thread state is 2003. (Thread Name: [CasConsumer
(Continue reading)

Thilo Goetz | 2 Jul 13:31
Picon
Picon

Re: Cloning a CAS

Hi Roberto,

see org.apache.uima.util.CasCopier, and in particular,
the copyFs() method.  This should provide what you need.

--Thilo

Roberto Franchini wrote:
> Hi to all,
> I'm developing a Segmenter for testing porpouse. At the end of our
> pipeline, we want to serialize to disk the annotation created by each
> annotators.
> At the moment it doesn't work as I want :(
> Let me explain the details.
> To do that, each annotator "sign" the annotation it creates using a
> feature called "annotatorId".
> Now, in the segmeter, I'm able to extract, using constranints and
> filtered iterator, the annotations created by each one:
> 
> //get le list of id:
> 		AnnotationIndex annotationIndex = jcas.getAnnotationIndex(Annotation.type);
> 		FSIterator iterator = annotationIndex.iterator();
> 		iterator.moveToFirst();
> 		Annotation current;
> 		Set<String> annotatorsIds = new TreeSet<String>();
> 
> 		while (iterator.hasNext()) {
> 
> 			current = (Annotation) iterator.next();
> 			annotatorsIds.add(current.getAnnoId());
(Continue reading)

Olivier Terrier | 2 Jul 13:39
Favicon

collectionProcessComplete() not called


Hi all,

I have a CPE with a cas consumer that throws a ResourceProcessException
in its process() method.
Surprisingly the collectionProcessComplete() method of my
StatusCallbackListener is never called at the end of the collection
processing.

Anybody has already experimented such a behaviour? Any hint?

It is quite easy to reproduce with a dummy consumer with this
implementation

public void processCas(CAS aCAS) throws ResourceProcessException {
	throw new ResourceProcessException(new
FileNotFoundException("file not found"));
}

Thanks

Olivier

Thilo Goetz | 2 Jul 13:55
Picon
Picon

Re: collectionProcessComplete() not called

Off the top of my head, I seem to remember that you
need to implement and register an error handler that
then gets called.  hth.

Olivier Terrier wrote:
>  
> Hi all,
> 
> I have a CPE with a cas consumer that throws a ResourceProcessException
> in its process() method.
> Surprisingly the collectionProcessComplete() method of my
> StatusCallbackListener is never called at the end of the collection
> processing.
> 
> Anybody has already experimented such a behaviour? Any hint?
> 
> It is quite easy to reproduce with a dummy consumer with this
> implementation
>  
> public void processCas(CAS aCAS) throws ResourceProcessException {
> 	throw new ResourceProcessException(new
> FileNotFoundException("file not found"));
> }
> 
> Thanks
> 
> Olivier

Olivier Terrier | 2 Jul 14:08
Favicon

RE: collectionProcessComplete() not called

Hi Thilo

What do you mean by an "error handler" ?
Is it something different from the StatusCallbackListener ?

O.

> -----Message d'origine-----
> De : Thilo Goetz [mailto:twgoetz@...] 
> Envoyé : mercredi 2 juillet 2008 13:56
> À : uima-user@...
> Objet : Re: collectionProcessComplete() not called
> 
> Off the top of my head, I seem to remember that you need to 
> implement and register an error handler that then gets called.  hth.
> 
> Olivier Terrier wrote:
> >  
> > Hi all,
> > 
> > I have a CPE with a cas consumer that throws a 
> > ResourceProcessException in its process() method.
> > Surprisingly the collectionProcessComplete() method of my 
> > StatusCallbackListener is never called at the end of the collection 
> > processing.
> > 
> > Anybody has already experimented such a behaviour? Any hint?
> > 
> > It is quite easy to reproduce with a dummy consumer with this 
> > implementation
(Continue reading)

Eddie Epstein | 2 Jul 15:31
Picon

Re: RMI Blocking Collection Reader

>
> 01.07.2008 15:38:26 org.apache.uima.collection.impl.cpm.engine.CPMEngine
> process
> INFO: The CAS consumer thread state is 2003. (Thread Name: [CasConsumer
> Pipeline Thread]::)
>

This message will come out if the application calls cpm.kill() and on
exceptions during processing. Maybe the ClassNotFoundException's are
bringing the CPM down? Would be nice to stop those.

Eddie

Gmane