Hello Jonas, Thank you for the code, it worked for me. I am able to get temporal annotation in the XMI output.
Regards, From: Jonas S [mailto:[email protected]] Sent: Tuesday, October 24, 2017 5:41 PM To: Prakhar Gaur <[email protected]> Subject: Re: Issue With Using Temporal Analysis in cTAKES 4.0.0 Hi, I attached a piper file ("ListPipeline.piper") which works for me on the latest revision of cTAKES (I havent tried it on 4.0.0). I also attached a zip file which holds the piperfiles that are referenced by ListPipeline.piper. Just open the ListPipeline.piper file from the extracted folder, and the temporal analysis should work. Please reply if it works:). Best regards, Jonas Jonas email: [email protected]<mailto:[email protected]> Am 24.10.17 um 08:41 schrieb Prakhar Gaur: Hello, I am using cTAKES 4.0.0 on Windows 8 behind a proxy server as part of a restricted network. We are trying to incorporate cTAKES as part of our Clinical document processing pipeline. I have been attempting to add Temporal analysis as part of Default Clinical pipeline and that has not been successful. (Using RunPiperFile.bat to execute the piper) Please see the piper file below: " // InputDirectory Directory for all input files. reader org.apache.ctakes.core.cr.FileTreeReader InputDirectory=C:\Users\prakhar.gaur\Documents load DefaultTokenizerPipeline.piper // Add non-core annotators add ContextDependentTokenizerAnnotator addDescription POSTagger // Add Chunkers load ChunkerSubPipe.piper // Default fast dictionary lookup add DefaultJCasTermAnnotator // Add Cleartk Entity Attribute annotators load AttributeCleartkSubPipe.piper // Add Time Annotator package org.apache.ctakes.temporal add org.apache.ctakes.temporal.ae.TimeAnnotator // addDescription org.apache.ctakes.temporal.ae.BackwardsTimeAnnotator modelPath=org/apache/ctakes/temporal/ae/timeannotator/model.jar // XMI Writer // Writes XMI files with full representation of input text and all extracted information. # OutputDirectory Output directory to write xmi files addLast org.apache.ctakes.core.cc.XmiWriterCasConsumerCtakes OutputDirectory=C:\Users\prakhar.gaur\Documents " EOF. Now I have tried two different ways to get a Time annotator to work. By adding a line to piper file as given above. 1. Line added to Piper file - "add org.apache.ctakes.temporal.ae.TimeAnnotator" I get error: 24 Oct 2017 11:40:56 ERROR PiperFileRunner - Initialization of annotator class "org.apache.ctakes.temporal.ae.TimeAnnotator" failed. (Descript or: <unknown>) 2. Line added to Piper file - "addDescription org.apache.ctakes.temporal.ae.BackwardsTimeAnnotator modelPath=org/apache/ctakes/temporal/ae/timeannotator/model.jar" I get error: 24 Oct 2017 11:37:40 ERROR PiperFileReader - No createAnnotatorDescription method in org.apache.ctakes.temporal.ae.BackwardsTimeAnnotator 24 Oct 2017 11:37:40 ERROR PiperFileRunner - 3. I tried using the default Temporal Aggregate Pipeline(TemporalAggregatePipeline.xml) inside CVD and get error Output from Stack trace (Only the important part): 11:48:03.680 - 14: org.apache.uima.tools.cvd.MainFrame.handleException(526): SEVERE: Initialization of annotator class "org.apache.ctakes.temporal.ae.DocTimeRelAnnotator" failed. (Descriptor: file:/C:/Users/prakhar.gaur/apache-ctakes-4.0.0/desc/ctakes-temporal/desc/analysis_engine/TemporalAggregatePipeline.xml<file:///C:/Users/prakhar.gaur/apache-ctakes-4.0.0/desc/ctakes-temporal/desc/analysis_engine/TemporalAggregatePipeline.xml>) org.apache.uima.resource.ResourceInitializationException: Initialization of annotator class "org.apache.ctakes.temporal.ae.DocTimeRelAnnotator" failed. (Descriptor: file:/C:/Users/prakhar.gaur/apache-ctakes-4.0.0/desc/ctakes-temporal/desc/analysis_engine/TemporalAggregatePipeline.xml<file:///C:/Users/prakhar.gaur/apache-ctakes-4.0.0/desc/ctakes-temporal/desc/analysis_engine/TemporalAggregatePipeline.xml>) Caused by: java.lang.IllegalArgumentException: Please specify PARAM_IS_TRAINING - unable to infer it from context Please help me in getting the Temporal annotation working for my pipeline. Pointers, Comments and actual solutions are all welcome. Thank you,
