Adam Lally | 2 Jul 18:15
Picon
Gravatar

Re: Performance bug in XmiCasSerializer?

Greg,

It doesn't look to me like you're doing anything wrong.

I did a quick test to try to reproduce this but wasn't able to... I
may need more information about your set up.

I created a CPE with the FileSystemCollectionReader,
PersonTitleAnnotator, and your XmiCasAnnotator.  (I filled in the part
about generating an identifier with something that checks the
SourceDocumentInformation annotations put there by the
FileSystemCollectionReader.)

On a particular set of documents, with the CPE desriptor's
processingUnitThreadCount set to 1 I get a total elapsed time of 9.25
seconds, whereas with the processingUnitThreadCount set to 10 I get a
total elapsed time of 6.875 seconds.  (This is on a dual-core
machine.)

A few questions come to mind:  Are you using a CPE to do the
multithreading or something else?  If something else, do you see the
same behavior if you try using a CPE instead?  Does this only happen
with large documents, and/or does it only happen when you have a lot
of annotations in the CAS (I have very few in my test).

Regards,
  -Adam

On 6/29/07, greg@...
<holmberg2066@...> wrote:
(Continue reading)

Andrew Serff | 2 Jul 21:47

UIMA Beginners Help?

Hello.  I'm very new to the whole world of data mining and have stumbled 
upon UIMA within the last week or so.  I'm trying to go through all the 
documentation and just create a simple application but am hitting some 
road blocks and was wondering where I can find some newbie help. I 
realize this is sorta of long, so I appreciate any help anyone can give. 

First I have a question: What is the difference between a CAS and a JCas 
and why would I want to use one over the other?  Is this determined by 
the AEs I'm using (i.e. if they are implemented by extending a 
JCas_*_impl) or is there some other reason?  It seems the CAS is more 
developed and has things like CasPools, ability to make CASes with 
multiple AEs, Consumers, etc.  Should I just be using the CAS interface 
and forget about JCas?

My main issue right now is that I can't figure out how to set inputs for 
an AE.  I can't find any examples of how to do it.  See the description 
below of what I'm trying to do:

I'm trying to use some pre bundled AEs to parse some text.  I basically 
want to do Named Entity Extraction on text.  So I wrote a simple 
application that first does Sentence Boundary detection and prints out 
the sentences that it finds.  That was easy enough.  So now I would like 
to take those sentences and feed it into the named entity AE.  Both the 
Sentence Boundary AE and the NE AE I'm using are from the JULIE lab 
(http://www.julielab.de).  Reading the documentation for the NE AE it 
says that is requires inputs as Sentences (the output of the Sentence 
Boundary AE).  I cannot figure out how to set those inputs and am stuck 
at this point.  Once I figure that out, I think I'll be getting NEs out 
of the CAS. 

(Continue reading)

Picon

Re: Performance bug in XmiCasSerializer?


 -------------- Original message ----------------------
From: "Adam Lally" <alally@...>
> Greg,
> 
> It doesn't look to me like you're doing anything wrong.
> 
> I did a quick test to try to reproduce this but wasn't able to... I
> may need more information about your set up.
> 
> I created a CPE with the FileSystemCollectionReader,
> PersonTitleAnnotator, and your XmiCasAnnotator.  (I filled in the part
> about generating an identifier with something that checks the
> SourceDocumentInformation annotations put there by the
> FileSystemCollectionReader.)
> 
> On a particular set of documents, with the CPE desriptor's
> processingUnitThreadCount set to 1 I get a total elapsed time of 9.25
> seconds, whereas with the processingUnitThreadCount set to 10 I get a
> total elapsed time of 6.875 seconds.  (This is on a dual-core
> machine.)

With two cores with Hyperthreading on, shouldn't you get about 3X the performance?  (Or at least 2.67X) In
other words, shouldn't you get an elapsed time of about 3.5 seconds?  Doesn't almost 7 seconds indicate a problem?

It seems like you have replicated the problem.  You CPE takes about twice as long as it should.

In my case, I used about 4X the CPU, but maybe if you increased the number of entities produced, the CPU usage
ratio between 1 thread and 10 threads would also increase to the 4X level.

(Continue reading)

Favicon

RE: UIMA Beginners Help?

Hopefully other people will correct and add to this:

JCas is essentially a Java wrapper for a CAS with a particular type
system.  For example if you create an Analysis Engine that produces
Sentence Annotations, JCasGen in the Eclipse plugin will generate a
Sentence class that can be easily added to a JCas.  The CAS itself is
easily accessed through the JCas.  Essentially, if you are working in
Java and you know the type system the AE is getting ahead of time it is
better to use the JCas. 

You can create a pipeline of Analysis Engines through an Aggregate
Analysis Engine.  So in the case of Sentences going to NE extraction.
You'd have an Aggregate Analysis Engine consisting of the Sentence
Extractor AE which adds Sentence annotations to the CAS and a NE
Extractor AE which uses the already present Sentence Annotations in the
course of adding Name Entity annotations (or PERSON annotations,
ORGANIZATION annotations, GPE annotations etc.) to the CAS.  I'm not
sure what you mean that your application has two CASes.  In the default
case there should only be one CAS and that should essentially represent
the entire document.  If you have some code that requires some small bit
of text such as a sentence, then this should probably be handled by code
inside of Analysis Engine code rather than by generating new CASes.  

My best piece of advice about this is that you should go through the
UIMA documentation and do the "Dave Extractor" example.  

All this said, it appears to me that UIMA-JNET doesn't actually require
any prior annotations on the CAS that it gets but generates its own
sentences internally.  Are you sure you aren't doing unnecessary work?

(Continue reading)

Thilo Goetz | 3 Jul 07:17
Picon
Picon

Re: Performance bug in XmiCasSerializer?

greg@... wrote:
>  -------------- Original message ----------------------
> From: "Adam Lally" <alally@...>
>> Greg,
>>
>> It doesn't look to me like you're doing anything wrong.
>>
>> I did a quick test to try to reproduce this but wasn't able to... I
>> may need more information about your set up.
>>
>> I created a CPE with the FileSystemCollectionReader,
>> PersonTitleAnnotator, and your XmiCasAnnotator.  (I filled in the part
>> about generating an identifier with something that checks the
>> SourceDocumentInformation annotations put there by the
>> FileSystemCollectionReader.)
>>
>> On a particular set of documents, with the CPE desriptor's
>> processingUnitThreadCount set to 1 I get a total elapsed time of 9.25
>> seconds, whereas with the processingUnitThreadCount set to 10 I get a
>> total elapsed time of 6.875 seconds.  (This is on a dual-core
>> machine.)
> 
> With two cores with Hyperthreading on, shouldn't you get about 3X the performance?  (Or at least 2.67X) In
other words, shouldn't you get an elapsed time of about 3.5 seconds?  Doesn't almost 7 seconds indicate a problem?

Depends what CPUs Adam has.  Intel's Core CPUs do not support hyperthreading.  What
Adam got seems like fairly standard scaling for a dual core for that sort of
multithreading, from my experience.

--Thilo
(Continue reading)

Katrin Tomanek | 3 Jul 07:25
Picon

Re: UIMA Beginners Help?

Hi,

> All this said, it appears to me that UIMA-JNET doesn't actually require
> any prior annotations on the CAS that it gets but generates its own
> sentences internally.  Are you sure you aren't doing unnecessary work?

No, UIMA-JNET requires sentence annotations as it will search on a 
sentence level for entities. When there are no sentences, it will not 
throw an error, but also not find anything.

best regards,

Katrin

--

-- 
Katrin Tomanek
Jena University Language and Information Engineering (JULIE) Lab
Phone: +49-3641-944307
Fax:   +49-3641-944321
email: tomanek@...
URL:   http://www.coling.uni-jena.de

Katrin Tomanek | 3 Jul 07:35
Picon

Re: UIMA Beginners Help?

Dear Andrew,

I have added a small documentation to our website, explaining how to set 
up a Collection Processing Engine (CPE) from PEAR packages. See here:

https://watchtower.coling.uni-jena.de/~tomanek/UIMA/

There is also a small demo-CPE.

In case you want to use the components rather programatically, i.e. in 
an application, you might refer the "UIMA Tutorial and Developers' 
Guides" (UIMA Version 2.1), section 3.2 (Using Analysis Engines). Do it 
as explained there, i.e. make a AE from the sentence splitter and from 
the named entity tagger. Create a CAS (important: as explained in 
3.2.6!) and then just run the process method of both AEs, sentence 
splitter first, then the ne tagger, on the CAS you created. Hope that works.

Best wishes,
Katrin

--

-- 
Katrin Tomanek
Jena University Language and Information Engineering (JULIE) Lab
Phone: +49-3641-944307
Fax:   +49-3641-944321
email: tomanek@...
URL:   http://www.julielab.de

Favicon

RE: UIMA Beginners Help?

So this brings up a legitimate question I have.  Even if you can specify
a pipeline in a CPE, wouldn't it be better practice to use an Aggregate
Analysis Engine in cases where there are actual input dependencies
between two or more analysis engines.  I had always understood the
purpose of the CPE to be getting collections of data to and from a set
of independent Analysis Engines, rather than specifically for defining
dependencies.  Is it part of the UIMA spec for example that the CPE
define an order on the Analysis Engines?  The CPE specifically excludes
the inclusion of a Flow Controller description.  Another argument I have
for using Aggregate AE's in a situation where there are dependencies is
that someone might want to use it without using the CPE at all.  For
example, somebody might already have an application that handles most of
the CPE stuff and just want to plug in the UIMA-JNET, they would have to
create an Aggregate of the Sentence Annotator and NE extractor anyway,
right?  On the other hand, is there a way to create an Aggregate
Analysis Engine, specifying the primitive Analysis Engines as separate
services?  If I want the Sentence Annotator to be a service and the NE
extractor to be a service, how do I make sure that the CAS hits these in
the right order?  How do I do this if the flow is not simply linear but
dynamic (i.e. the output of the language identifier sends the CAS to the
correct Sentence annotator)? 

-----Original Message-----
From: Katrin Tomanek [mailto:tomanek@...] 
Sent: Tuesday, July 03, 2007 1:35 AM
To: uima-user@...
Subject: Re: UIMA Beginners Help?

Dear Andrew,

(Continue reading)

Adam Lally | 3 Jul 14:58
Picon
Gravatar

Re: Performance bug in XmiCasSerializer?

On 7/3/07, Thilo Goetz <twgoetz@...> wrote:
> Depends what CPUs Adam has.  Intel's Core CPUs do not support hyperthreading.  What
> Adam got seems like fairly standard scaling for a dual core for that sort of
> multithreading, from my experience.
>

Yes, it's an Intel Core Duo.  It appears to the OS as two CPUs, not four.

-Adam


Gmane