You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by feixiangcq <fe...@gmail.com> on 2009/10/20 11:23:40 UTC

Reducing cost in AE in UIMA AS.

Hello,
  I have homework about designing AE in UIMA AS.The AE includes there steps:
1.It reads data from file system;
2.Build a model from the data just readed;
3.Analyze the CAS which I get from CollectionReader using the model in step 2.
  If I deploy the AE on a computer and analyze one CAS,it works well.
However,If there are many CASes and the AE can only analyze one CAS at a 
time,what about the cost I spend?
  That is,every time the AE anlyze a CAS,it must do step 1 and 2,
but actually the model in step 2 are the same for all CASes.
Step 1 and 2 are repeated and they cost much of the time.
Can the AE only need do step 1 and 2 once and it can analyze all CASes?
Or is there some sollution to reduce the cost of step 1 and 2?
  By the way,I have another question.Can the CollectionReader of computer A 
read files from computer B? Is there an example in UIMA AS source code? Or can 
anyone give me an example?
  I am very glad to hear you answer.
  Thank you!


Re: Reducing cost in AE in UIMA AS.

Posted by Thilo Goetz <tw...@gmx.de>.
feixiangcq wrote:
> Hello,
>   I have homework about designing AE in UIMA AS.The AE includes there steps:
> 1.It reads data from file system;
> 2.Build a model from the data just readed;
> 3.Analyze the CAS which I get from CollectionReader using the model in step 2.
>   If I deploy the AE on a computer and analyze one CAS,it works well.
> However,If there are many CASes and the AE can only analyze one CAS at a 
> time,what about the cost I spend?
>   That is,every time the AE anlyze a CAS,it must do step 1 and 2,
> but actually the model in step 2 are the same for all CASes.
> Step 1 and 2 are repeated and they cost much of the time.
> Can the AE only need do step 1 and 2 once and it can analyze all CASes?
> Or is there some sollution to reduce the cost of step 1 and 2?

You could do 1. and 2. at initialization time, by implementing
the initialize() method.  See
http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/api/org/apache/uima/analysis_component/AnalysisComponent.html#initialize(org.apache.uima.UimaContext)

--Thilo

>   By the way,I have another question.Can the CollectionReader of computer A 
> read files from computer B? Is there an example in UIMA AS source code? Or can 
> anyone give me an example?
>   I am very glad to hear you answer.
>   Thank you!