Hi Manuel,

My first comment is that you are running ctakes in a somewhat “ancient” manner, 
or better put, the xml descriptor workflow has been pretty much deprecated.

You should try to run ctakes 4.0.  If you are software savvy then I advise that 
you try the development version that is in trunk.  You’ve probably been on the 
ctakes download page, but just a reminder :
http://ctakes.apache.org/

The ctakes wiki has some useful information, and the 4.0 entry is here:
https://cwiki.apache.org/confluence/display/CTAKES/cTAKES+4.0

To start playing with ctakes I suggest that you try to run the default clinical 
pipeline, following the instructions here:
https://cwiki.apache.org/confluence/display/CTAKES/Default+Clinical+Pipeline

Those instructions will start the default clinical pipeline from a command 
line.  If you have the development version from trunk then there is a gui 
available to run pipelines:
https://cwiki.apache.org/confluence/display/CTAKES/Piper+File+Submitter+GUI

There are also many other pipeline configurations available in trunk to run 
more advanced / involved pipelines.  They are not in the 4.0 release.  The 
pipelines (including 4.0 default) are all defined using the replacement for 
those xml descriptor files.  The replacements are called “piper files”.
https://cwiki.apache.org/confluence/display/CTAKES/Piper+Files

I hope that you find the pipers easier to understand and use than the old xml 
descriptors.

Anyway, if you run the ctakes 4.0 default clinical pipeline as outlined in the 
wiki page it will use the new FileTreeReader and FileTreeXmiWriter combination.

Give it a whirl and let me know how things go.

Sean


From: Manuel Lamy [mailto:[email protected]]
Sent: Thursday, January 25, 2018 9:09 AM
To: [email protected]
Subject: Re: Problem using CPE and XMI Writer CAS Consumer [EXTERNAL]

Hello Sean,

First of all, thanks for your quick answer.

I'm probably making some confusion over here, so I have the following questions.


  1.  A CAS Consumer is defined by a XML file. What you are implying is that I 
should go to my consumer XML (__XmiWriterCasConsumer.xml) and change it's 
<implementationName> tag to 'org.apache.ctakes.core.cc.FileTreeXmiWriter' 
instead of 'org.apache.ctakes.core.cc.XmiWriterCasConsumer'? Funny enough, it 
gives me a classNotFoundException if I do this. Would like to have your 
confirmation if I'm doing the right thing please. The class is well defined in 
that path though.
  2.  Concerning the reader, I make the same analogy. Should I go to my 
descriptor and change it's <implementationName> tag from 
'org.apache.ctakes.core.cr.FilesInDirectoryCollectionReader' to 
'org.apache.ctakes.core.cr.FileTreeReader'?
I did these two things and the error is the same concerning the new consumer 
'FileTreeXmiWriter', as you can see in the first image attached to this e-mail.

I would also like to ask you another question:


       3. Why does my class 'FileTreeXmiWriter' has a lot of unresolved 
classes? You can see it in the second image attached to this e-mail. I can't 
seem to import them right. I tried to import the extension of this class only 
to check the result, and look how it solved the import to me. 'apache' is not 
recognized. I'm just kinda baffled with the hierarchy defined for this project. 
If you could give me a little bit of clarification in this topic and how to 
solve it I would be appreciated.

Thanks for your attention! I'm really looking forward to put this to work. 
cTAKES seems awesome. It just needs these little tweaks.

Best regards,

Manuel





2018-01-24 22:26 GMT+00:00 Finan, Sean 
<[email protected]<mailto:[email protected]>>:
Hi Manuel,

Your image got scrubbed by a server, but the problem may have been fixed in a 
recent xmi writer.  The latest xmi writer is in ctakes core and is named 
FileTreeXmiWriter.  One possible cause for a problem in the writer is if the 
document has some unexpected character or character combination.  A document 
reader should be massaging documents before they are processed and sent to the 
writer.  The most recent file reader is named FileTreeReader and is also in 
ctakes core.

Sean



From: Manuel Lamy [mailto:[email protected]<mailto:[email protected]>]
Sent: Wednesday, January 24, 2018 5:10 PM
To: [email protected]<mailto:[email protected]>
Subject: Problem using CPE and XMI Writer CAS Consumer [EXTERNAL]

Hello guys,

I'm having problems running the CPE using a XMI Writer CAS Consumer. However, 
it works with other consumers.

Problem

In the figure below, you can see my setup and the error I'm obtaining:

[Imagem inline 2]

Logs

Concerning logs, I'm obtaining this from Intellij:

org.apache.uima.resource.ResourceInitializationException
            at 
org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:81)
            at 
org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine(UIMAFramework_impl.java:438)
            at 
org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(UIMAFramework.java:918)
            at 
org.apache.uima.tools.cpm.CpmPanel.startProcessing(CpmPanel.java:573)
            at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java:105)
            at org.apache.uima.tools.cpm.CpmPanel$1.run(CpmPanel.java:713)
Caused by: org.apache.uima.resource.ResourceConfigurationException
            at 
org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1093)
            at 
org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(CPEFactory.java:547)
            at 
org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(BaseCPMImpl.java:253)
            at 
org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(BaseCPMImpl.java:127)
            at 
org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:73)
            ... 5 more
Caused by: java.lang.Exception: The component XMI Writer CAS Consumer cannot be 
created. (Thread Name: Thread-5)
            ... 10 more

Attempted Solutions

I only found one guy with the same problem as me. The solution proposed in the 
thread, by Sean Finan, was to change the xml of my consumer 
(__XmiWriterCasConsumer.xml), particularly the content of the tag 
<implementationName>, from

 
<implementationName>org.apache.ctakes.core.cc<https://urldefense.proofpoint.com/v2/url?u=http-3A__apache.ctakes.core.cc&d=DwMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=55lXUJ1MFPyBhpVH4sCBuEZD-InGrPRtD4YTvCJpMFo&s=zBsJhrOUC6BXHsKiMP4cEZTtjqB73N9V-kjGKPhqaNA&e=>.XmiWriterCasConsumerCtakes</implementationName>

to

<implementationName>org.apache.uima.tools.components.XmiWriterCasConsumer</implementationName>



However, this didn't work. The error is exactly the same. I'm out of ideas 
about what to do. I would like to have the report of CPE in XMI, in order to 
read it with CVD. You can see the thread here:

http://mail-archives.apache.org/mod_mbox/ctakes-dev/201701.mbox/%[email protected]%3E<https://urldefense.proofpoint.com/v2/url?u=http-3A__mail-2Darchives.apache.org_mod-5Fmbox_ctakes-2Ddev_201701.mbox_-253C29cefd1fa1b44ce4a8dc92ec8b1cd882-40CHEXMAIL1A.CHBOSTON.ORG-253E&d=DwMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=55lXUJ1MFPyBhpVH4sCBuEZD-InGrPRtD4YTvCJpMFo&s=vzHmir9t5IBncKpumZCOCqviJeDNNVl4ZkjEiK9AMp8&e=><https://urldefense.proofpoint.com/v2/url?u=http-3A__mail-2Darchives.apache.org_mod-5Fmbox_ctakes-2Ddev_201701.mbox_-253C29cefd1fa1b44ce4a8dc92ec8b1cd882-40CHEXMAIL1A.CHBOSTON.ORG-253E&d=DwMFaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=N5zX2YGt7jbGKsiWAN7z5tdADmV2PwJdHTvvx2oZ2fM&s=5c-Yr8TMBg7-VyEjwF7gJlT1xP3LpHC6dvnZbihxDPg&e=>



Result Expected

Running the CPE process and have outputs as XMI files.



Result Obtained

Running the CPE results in an error, specifically for the consumer 
__XMIWriterCasConsumer.



Conclusion

Do any of you guys had this problem before? Do you have a suggestion about how 
can it be solved? Thanks a lot



Best regards,

Manuel

Reply via email to