You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by harshal patni <pa...@gmail.com> on 2013/05/08 12:04:57 UTC

AnalysisEngineDescription XML

Hello Everyone,
                      I am trying to call AnalysisEngineDescription XML
files within UIMAFIT.  Here is what I do..

 CollectionReader reader =
UriCollectionReader.getCollectionReaderFromFiles(files);

XMLInputSource in1 = new XMLInputSource("desc/analysisenginedescription.xml"
);

     AnalysisEngineDescription aeDesc2 =
UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in1);

AggregateBuilder builder = new AggregateBuilder();

builder.add(aeDesc2);

SimplePipeline.runPipeline(reader, builder.createAggregateDescription());

Is this right? I have some XML files I had built using Component Descriptor
earlier. I was using this within UIMA pipeline. I recently wanted to
integrate POS Tagger (ClearTK) within my pipeline. This when I cam across
UIMAFIT...

I keep getting an error whenever I run this code?

Thanks,

Harshal

Re: AnalysisEngineDescription XML

Posted by harshal patni <pa...@gmail.com>.
Thanks Richard for all the help :)

Harshal

On May 8, 2013, at 10:32 PM, Richard Eckart de Castilho
<ri...@gmail.com> wrote:

> Well, I said it may be easier to use the factory methods of uimaFIT
> if you want to use ClearTK and uimaFIT at the same time.
>
> I am pretty sure that you can use ClearTK just with descriptors in the
> traditional UIMA way, without uimaFIT. In fact, I'd be very surprised
> if there was anything preventing that. I don't know if the ClearTK folks
> ship such descriptors. You'd better ask on their mailing list I suppose.
>
> But still, regarding your very first message in the error. I looked quite
> right what you had, I just had the impression, that you didn't properly
> configure your reader. And the part where you set up the reader wasn't
> included in your code snippet.
>
> Cheers,
>
> -- Richard
>
> Am 08.05.2013 um 17:28 schrieb harshal patni <pa...@gmail.com>:
>
>> Oopps! So then is there a way to integrate ClearTK in UIMA directly?
>>
>> Harshal
>>
>>
>> On Wed, May 8, 2013 at 8:51 PM, Richard Eckart de Castilho <
>> richard.eckart@gmail.com> wrote:
>>
>>> Am 08.05.2013 um 17:05 schrieb harshal patni <pa...@gmail.com>:
>>>
>>>> Hi Richard,
>>>>               Thanks a lot. That helped! I replaced the following
>>>> function -
>>>>
>>>> AnalysisEngineFactory.createAnalysisEngineFromPath(
>>>> "desc/AggregateAnalysisEngine.xml");
>>>>
>>>> Now this produces an AnalysisEngine. How do I convert from AnalysisEngine
>>>> to AnalysisEngineDescription. SimplePipeline.runPipeline only takes
>>>> AnalysisEngineDescription.
>>>>
>>>>
>>>> Also I would like to get an annotated XML as an output. How would I do
>>> that?
>>>
>>> That's currently a "hole" in the uimaFIT API. You can resort to plain UIMA
>>> for loading descriptors, as you did initially.
>>>
>>> See also
>>> http://mail-archives.apache.org/mod_mbox/uima-user/201304.mbox/%3c0E05EFB7-2E09-4109-AF85-432A32D7961A@gmail.com%3e
>>>
>>> I'll add some convenience here for uimaFIT 2.0.0
>>>
>>> https://issues.apache.org/jira/browse/UIMA-2885
>>>
>>> Cheers,
>>>
>>> -- Richard
>

Re: AnalysisEngineDescription XML

Posted by Richard Eckart de Castilho <ri...@gmail.com>.
Well, I said it may be easier to use the factory methods of uimaFIT
if you want to use ClearTK and uimaFIT at the same time.

I am pretty sure that you can use ClearTK just with descriptors in the
traditional UIMA way, without uimaFIT. In fact, I'd be very surprised
if there was anything preventing that. I don't know if the ClearTK folks
ship such descriptors. You'd better ask on their mailing list I suppose.

But still, regarding your very first message in the error. I looked quite
right what you had, I just had the impression, that you didn't properly
configure your reader. And the part where you set up the reader wasn't
included in your code snippet.

Cheers,

-- Richard

Am 08.05.2013 um 17:28 schrieb harshal patni <pa...@gmail.com>:

> Oopps! So then is there a way to integrate ClearTK in UIMA directly?
> 
> Harshal
> 
> 
> On Wed, May 8, 2013 at 8:51 PM, Richard Eckart de Castilho <
> richard.eckart@gmail.com> wrote:
> 
>> Am 08.05.2013 um 17:05 schrieb harshal patni <pa...@gmail.com>:
>> 
>>> Hi Richard,
>>>                Thanks a lot. That helped! I replaced the following
>>> function -
>>> 
>>> AnalysisEngineFactory.createAnalysisEngineFromPath(
>>> "desc/AggregateAnalysisEngine.xml");
>>> 
>>> Now this produces an AnalysisEngine. How do I convert from AnalysisEngine
>>> to AnalysisEngineDescription. SimplePipeline.runPipeline only takes
>>> AnalysisEngineDescription.
>>> 
>>> 
>>> Also I would like to get an annotated XML as an output. How would I do
>> that?
>> 
>> That's currently a "hole" in the uimaFIT API. You can resort to plain UIMA
>> for loading descriptors, as you did initially.
>> 
>> See also
>> http://mail-archives.apache.org/mod_mbox/uima-user/201304.mbox/%3c0E05EFB7-2E09-4109-AF85-432A32D7961A@gmail.com%3e
>> 
>> I'll add some convenience here for uimaFIT 2.0.0
>> 
>> https://issues.apache.org/jira/browse/UIMA-2885
>> 
>> Cheers,
>> 
>> -- Richard


Re: AnalysisEngineDescription XML

Posted by harshal patni <pa...@gmail.com>.
Oopps! So then is there a way to integrate ClearTK in UIMA directly?

Harshal


On Wed, May 8, 2013 at 8:51 PM, Richard Eckart de Castilho <
richard.eckart@gmail.com> wrote:

> Am 08.05.2013 um 17:05 schrieb harshal patni <pa...@gmail.com>:
>
> > Hi Richard,
> >                 Thanks a lot. That helped! I replaced the following
> > function -
> >
> > AnalysisEngineFactory.createAnalysisEngineFromPath(
> > "desc/AggregateAnalysisEngine.xml");
> >
> > Now this produces an AnalysisEngine. How do I convert from AnalysisEngine
> > to AnalysisEngineDescription. SimplePipeline.runPipeline only takes
> > AnalysisEngineDescription.
> >
> >
> > Also I would like to get an annotated XML as an output. How would I do
> that?
>
> That's currently a "hole" in the uimaFIT API. You can resort to plain UIMA
> for loading descriptors, as you did initially.
>
> See also
> http://mail-archives.apache.org/mod_mbox/uima-user/201304.mbox/%3c0E05EFB7-2E09-4109-AF85-432A32D7961A@gmail.com%3e
>
> I'll add some convenience here for uimaFIT 2.0.0
>
>  https://issues.apache.org/jira/browse/UIMA-2885
>
> Cheers,
>
> -- Richard




-- 

*Harshal Patni** | *Data Architect | Zynx Health ™

10880 Wilshire Boulevard, Suite 300 | Los Angeles, CA, 90024

Mobile : 937-760-6639| hpatni@zynx.com
<at...@zynx.com>

<http://www.linkedin.com/in/harshalpatni> |
<http://knoesis.wright.edu/researchers/harshal/>

www.zynxhealth.com <http://www.zynx.com/>

“*Most Interesting Vendor” 2010*
- Healthcare Informatics

Re: AnalysisEngineDescription XML

Posted by Richard Eckart de Castilho <ri...@gmail.com>.
Am 08.05.2013 um 17:05 schrieb harshal patni <pa...@gmail.com>:

> Hi Richard,
>                 Thanks a lot. That helped! I replaced the following
> function -
> 
> AnalysisEngineFactory.createAnalysisEngineFromPath(
> "desc/AggregateAnalysisEngine.xml");
> 
> Now this produces an AnalysisEngine. How do I convert from AnalysisEngine
> to AnalysisEngineDescription. SimplePipeline.runPipeline only takes
> AnalysisEngineDescription.
> 
> 
> Also I would like to get an annotated XML as an output. How would I do that?

That's currently a "hole" in the uimaFIT API. You can resort to plain UIMA 
for loading descriptors, as you did initially.

See also http://mail-archives.apache.org/mod_mbox/uima-user/201304.mbox/%3c0E05EFB7-2E09-4109-AF85-432A32D7961A@gmail.com%3e

I'll add some convenience here for uimaFIT 2.0.0

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

Cheers,

-- Richard

Re: AnalysisEngineDescription XML

Posted by harshal patni <pa...@gmail.com>.
Hi Richard,
                 Thanks a lot. That helped! I replaced the following
function -

AnalysisEngineFactory.createAnalysisEngineFromPath(
"desc/AggregateAnalysisEngine.xml");

Now this produces an AnalysisEngine. How do I convert from AnalysisEngine
to AnalysisEngineDescription. SimplePipeline.runPipeline only takes
AnalysisEngineDescription.


Also I would like to get an annotated XML as an output. How would I do that?


Thanks,

Harshal





On Wed, May 8, 2013 at 5:47 PM, Richard Eckart de Castilho <
richard.eckart@gmail.com> wrote:

> Am 08.05.2013 um 13:57 schrieb harshal patni <pa...@gmail.com>:
>
> > HI Richard,
> >                Eclipse seems to crib about StringReader.PARAM_TEXT and
> > wants me to change the name?
> >
> > Harshal
>
> This is what I used:
>
>  public class StringReader extends
> org.apache.uima.fit.component.CasCollectionReader_ImplBase {
>     private boolean hasBeenRead = false;
>
>     public static final String PARAM_TEXT = "text";
>
>     @ConfigurationParameter(name = PARAM_TEXT)
>     private String text;
>
>     public void getNext(CAS aCAS) throws IOException, CollectionException {
>       aCAS.setDocumentText(text);
>       hasBeenRead = true;
>     }
>
>     public boolean hasNext() throws IOException, CollectionException {
>       return !hasBeenRead;
>     }
>
>     public Progress[] getProgress() {
>       return null;
>     }
>   }




-- 

*Harshal Patni** | *Data Architect | Zynx Health ™

10880 Wilshire Boulevard, Suite 300 | Los Angeles, CA, 90024

Mobile : 937-760-6639| hpatni@zynx.com
<at...@zynx.com>

<http://www.linkedin.com/in/harshalpatni> |
<http://knoesis.wright.edu/researchers/harshal/>

www.zynxhealth.com <http://www.zynx.com/>

“*Most Interesting Vendor” 2010*
- Healthcare Informatics

Re: AnalysisEngineDescription XML

Posted by Richard Eckart de Castilho <ri...@gmail.com>.
Am 08.05.2013 um 13:57 schrieb harshal patni <pa...@gmail.com>:

> HI Richard,
>                Eclipse seems to crib about StringReader.PARAM_TEXT and
> wants me to change the name?
> 
> Harshal

This is what I used:

 public class StringReader extends org.apache.uima.fit.component.CasCollectionReader_ImplBase {
    private boolean hasBeenRead = false;

    public static final String PARAM_TEXT = "text";

    @ConfigurationParameter(name = PARAM_TEXT)
    private String text;

    public void getNext(CAS aCAS) throws IOException, CollectionException {
      aCAS.setDocumentText(text);
      hasBeenRead = true;
    }

    public boolean hasNext() throws IOException, CollectionException {
      return !hasBeenRead;
    }

    public Progress[] getProgress() {
      return null;
    }
  }

Re: AnalysisEngineDescription XML

Posted by harshal patni <pa...@gmail.com>.
HI Richard,
                Eclipse seems to crib about StringReader.PARAM_TEXT and
wants me to change the name?

Harshal


On Wed, May 8, 2013 at 5:00 PM, Richard Eckart de Castilho <
richard.eckart@gmail.com> wrote:

> Am 08.05.2013 um 13:07 schrieb harshal patni <pa...@gmail.com>:
>
> >>>                     I am trying to call AnalysisEngineDescription XML
> >>> files within UIMAFIT.  Here is what I do..
> >>>
> >>> CollectionReader reader =
> >>> UriCollectionReader.getCollectionReaderFromFiles(files);
> >>>
> >>> XMLInputSource in1 = new
> >> XMLInputSource("desc/analysisenginedescription.xml"
> >>> );
> >>>
> >>>    AnalysisEngineDescription aeDesc2 =
> >>> UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in1);
> >>>
> >>> AggregateBuilder builder = new AggregateBuilder();
> >>>
> >>> builder.add(aeDesc2);
> >>>
> >>> SimplePipeline.runPipeline(reader,
> builder.createAggregateDescription());
>
>
> > Caused by: java.lang.NullPointerException
> >
> > at org.apache.uima.annotator.WhitespaceTokenizer.process(
> > WhitespaceTokenizer.java:106)
>
> No idea what happens here. The line reads (WhitespaceTokenizer 2.3.1)
>
> char[] textContent = this.cas.getDocumentText().toCharArray();
>
>
> I have created a simple test pipeline on my system reading:
>
>     CollectionReaderDescription reader =
> CollectionReaderFactory.createDescription(
>             StringReader.class, StringReader.PARAM_TEXT, "This is a test
> .");
>
>     AnalysisEngineDescription tokenizer = AnalysisEngineFactory
>             .createAnalysisEngineDescription("WhitespaceTokenizer");
>
>     AggregateBuilder builder = new AggregateBuilder();
>     builder.add(tokenizer);
>
>     SimplePipeline.runPipeline(reader,
> builder.createAggregateDescription());
>
> The StringReader does nothing more than create a single CAS with the text
> in PARAM_TEXT
> set as document text.
>
> This appears to run without an error.
>
> Is it possible that your reader is does not produce proper text? When I
> change StringReader
> to leave documentText = null, then I also get this exception:
>
> Caused by: java.lang.NullPointerException
>         at
> org.apache.uima.annotator.WhitespaceTokenizer.process(WhitespaceTokenizer.java:106)
>
> -- Richard

Re: AnalysisEngineDescription XML

Posted by Richard Eckart de Castilho <ri...@gmail.com>.
Am 08.05.2013 um 13:07 schrieb harshal patni <pa...@gmail.com>:

>>>                     I am trying to call AnalysisEngineDescription XML
>>> files within UIMAFIT.  Here is what I do..
>>> 
>>> CollectionReader reader =
>>> UriCollectionReader.getCollectionReaderFromFiles(files);
>>> 
>>> XMLInputSource in1 = new
>> XMLInputSource("desc/analysisenginedescription.xml"
>>> );
>>> 
>>>    AnalysisEngineDescription aeDesc2 =
>>> UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in1);
>>> 
>>> AggregateBuilder builder = new AggregateBuilder();
>>> 
>>> builder.add(aeDesc2);
>>> 
>>> SimplePipeline.runPipeline(reader, builder.createAggregateDescription());


> Caused by: java.lang.NullPointerException
> 
> at org.apache.uima.annotator.WhitespaceTokenizer.process(
> WhitespaceTokenizer.java:106)

No idea what happens here. The line reads (WhitespaceTokenizer 2.3.1)

char[] textContent = this.cas.getDocumentText().toCharArray();


I have created a simple test pipeline on my system reading:

    CollectionReaderDescription reader = CollectionReaderFactory.createDescription(
            StringReader.class, StringReader.PARAM_TEXT, "This is a test .");

    AnalysisEngineDescription tokenizer = AnalysisEngineFactory
            .createAnalysisEngineDescription("WhitespaceTokenizer");

    AggregateBuilder builder = new AggregateBuilder();
    builder.add(tokenizer);

    SimplePipeline.runPipeline(reader, builder.createAggregateDescription());

The StringReader does nothing more than create a single CAS with the text in PARAM_TEXT 
set as document text.

This appears to run without an error.

Is it possible that your reader is does not produce proper text? When I change StringReader
to leave documentText = null, then I also get this exception:

Caused by: java.lang.NullPointerException
	at org.apache.uima.annotator.WhitespaceTokenizer.process(WhitespaceTokenizer.java:106)

-- Richard

Re: AnalysisEngineDescription XML

Posted by harshal patni <pa...@gmail.com>.
Hello Richard,
                    Thank you for the response. Here is the error I get. I
am trying to call the WhitespaceTokenizer.xml within UIMAFIT.

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

May 8, 2013 4:35:40 PM
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl
callAnalysisComponentProcess(407)

SEVERE: Exception occurred

org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator
processing failed.

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(
PrimitiveAnalysisEngine_impl.java:391)

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(
PrimitiveAnalysisEngine_impl.java:296)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:567)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:409)

at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:342)

at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:267)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:567)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:409)

at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:342)

at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:267)

at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(
AnalysisEngineImplBase.java:267)

at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.execute(RunUIMAFit.java:62
)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.<init>(RunUIMAFit.java:28)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.main(RunUIMAFit.java:89)

Caused by: java.lang.NullPointerException

at org.apache.uima.annotator.WhitespaceTokenizer.process(
WhitespaceTokenizer.java:106)

at org.apache.uima.analysis_component.CasAnnotator_ImplBase.process(
CasAnnotator_ImplBase.java:56)

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(
PrimitiveAnalysisEngine_impl.java:375)

... 14 more

May 8, 2013 4:35:40 PM
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl
processAndOutputNewCASes(275)

SEVERE: Exception occurred

org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator
processing failed.

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(
PrimitiveAnalysisEngine_impl.java:391)

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(
PrimitiveAnalysisEngine_impl.java:296)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:567)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:409)

at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:342)

at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:267)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:567)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:409)

at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:342)

at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:267)

at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(
AnalysisEngineImplBase.java:267)

at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.execute(RunUIMAFit.java:62
)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.<init>(RunUIMAFit.java:28)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.main(RunUIMAFit.java:89)

Caused by: java.lang.NullPointerException

at org.apache.uima.annotator.WhitespaceTokenizer.process(
WhitespaceTokenizer.java:106)

at org.apache.uima.analysis_component.CasAnnotator_ImplBase.process(
CasAnnotator_ImplBase.java:56)

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(
PrimitiveAnalysisEngine_impl.java:375)

... 14 more

May 8, 2013 4:35:40 PM
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl
processAndOutputNewCASes(275)

SEVERE: Exception occurred

org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator
processing failed.

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(
PrimitiveAnalysisEngine_impl.java:391)

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(
PrimitiveAnalysisEngine_impl.java:296)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:567)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:409)

at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:342)

at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:267)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:567)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:409)

at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:342)

at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:267)

at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(
AnalysisEngineImplBase.java:267)

at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.execute(RunUIMAFit.java:62
)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.<init>(RunUIMAFit.java:28)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.main(RunUIMAFit.java:89)

Caused by: java.lang.NullPointerException

at org.apache.uima.annotator.WhitespaceTokenizer.process(
WhitespaceTokenizer.java:106)

at org.apache.uima.analysis_component.CasAnnotator_ImplBase.process(
CasAnnotator_ImplBase.java:56)

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(
PrimitiveAnalysisEngine_impl.java:375)

... 14 more

org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator
processing failed.

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(
PrimitiveAnalysisEngine_impl.java:391)

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(
PrimitiveAnalysisEngine_impl.java:296)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:567)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:409)

at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:342)

at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:267)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(
ASB_impl.java:567)

at
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(
ASB_impl.java:409)

at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(
ASB_impl.java:342)

at
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(
AggregateAnalysisEngine_impl.java:267)

at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(
AnalysisEngineImplBase.java:267)

at org.uimafit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:80)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.execute(RunUIMAFit.java:62
)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.<init>(RunUIMAFit.java:28)

at com.zynx.contentanalyzer.controllor.RunUIMAFit.main(RunUIMAFit.java:89)

Caused by: java.lang.NullPointerException

at org.apache.uima.annotator.WhitespaceTokenizer.process(
WhitespaceTokenizer.java:106)

at org.apache.uima.analysis_component.CasAnnotator_ImplBase.process(
CasAnnotator_ImplBase.java:56)

at
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(
PrimitiveAnalysisEngine_impl.java:375)

... 14 more


On Wed, May 8, 2013 at 4:21 PM, Richard Eckart de Castilho <
richard.eckart@gmail.com> wrote:

> Hi,
>
> > I recently wanted to
> > integrate POS Tagger (ClearTK) within my pipeline. This when I cam across
> > UIMAFIT...
>
>
> if you use ClearTK and want to use uimaFIT, it should be much easier for
> you to avoid the XML files altogether and just use the uimaFIT factories.
>
> AnalysisEngineFactory.createPrimitiveDescription(PosTagger.class);
>
> >                      I am trying to call AnalysisEngineDescription XML
> > files within UIMAFIT.  Here is what I do..
> >
> > CollectionReader reader =
> > UriCollectionReader.getCollectionReaderFromFiles(files);
> >
> > XMLInputSource in1 = new
> XMLInputSource("desc/analysisenginedescription.xml"
> > );
> >
> >     AnalysisEngineDescription aeDesc2 =
> > UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in1);
> >
> > AggregateBuilder builder = new AggregateBuilder();
> >
> > builder.add(aeDesc2);
> >
> > SimplePipeline.runPipeline(reader, builder.createAggregateDescription());
> >
> > Is this right? I have some XML files I had built using Component
> Descriptor
> > earlier. I was using this within UIMA pipeline.
> >
> > I keep getting an error whenever I run this code?
>
> What error do you get?
>
> -- Richard




-- 

*Harshal Patni** | *Data Architect | Zynx Health ™

10880 Wilshire Boulevard, Suite 300 | Los Angeles, CA, 90024

Mobile : 937-760-6639| hpatni@zynx.com
<at...@zynx.com>

<http://www.linkedin.com/in/harshalpatni> |
<http://knoesis.wright.edu/researchers/harshal/>

www.zynxhealth.com <http://www.zynx.com/>

“*Most Interesting Vendor” 2010*
- Healthcare Informatics

Re: AnalysisEngineDescription XML

Posted by Richard Eckart de Castilho <ri...@gmail.com>.
Hi,

> I recently wanted to
> integrate POS Tagger (ClearTK) within my pipeline. This when I cam across
> UIMAFIT...


if you use ClearTK and want to use uimaFIT, it should be much easier for
you to avoid the XML files altogether and just use the uimaFIT factories.

AnalysisEngineFactory.createPrimitiveDescription(PosTagger.class);

>                      I am trying to call AnalysisEngineDescription XML
> files within UIMAFIT.  Here is what I do..
> 
> CollectionReader reader =
> UriCollectionReader.getCollectionReaderFromFiles(files);
> 
> XMLInputSource in1 = new XMLInputSource("desc/analysisenginedescription.xml"
> );
> 
>     AnalysisEngineDescription aeDesc2 =
> UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in1);
> 
> AggregateBuilder builder = new AggregateBuilder();
> 
> builder.add(aeDesc2);
> 
> SimplePipeline.runPipeline(reader, builder.createAggregateDescription());
> 
> Is this right? I have some XML files I had built using Component Descriptor
> earlier. I was using this within UIMA pipeline.
> 
> I keep getting an error whenever I run this code?

What error do you get?

-- Richard