Hi Bhagwat, Thanks for the heads up on the "file:" issue. I will check to see if the usage has changed and fix the piper.
Sean -----Original Message----- From: Bhagwat Posane [mailto:bhagwat.pos...@gmail.com] Sent: Thursday, November 23, 2017 9:17 AM To: dev@ctakes.apache.org Subject: Re: Interpret context out of clinical note [EXTERNAL] Thanks James, It worked using cast to Map. ! Sean, In AssertionDefaults.piper you set the file like: set assertionModelResource=file:org/apache/ctakes/assertion/models/i2b2.model As I run this piper file it throws file not found exception, it resolved for me by removing "file:" from command, I suppose this needs to be fixed. On 22 November 2017 at 23:21, Finan, Sean <sean.fi...@childrens.harvard.edu> wrote: > Wow, that is really strange. > > https://urldefense.proofpoint.com/v2/url?u=https-3A__uima.apache.org_d > _uimafit-2Dcurrent_api_org_&d=DwIBaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZM > SdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=1A9asf1ga > bEGz-5fQfVfXbp2BcZEJaZIiJ4zSk09P1M&s=jo0yN7BJTt98IHerLXLK4aQvmSOAn90pU > lzHg00ynFI&e= > apache/uima/fit/util/JCasUtil.html > > > > -----Original Message----- > From: James Masanz [mailto:masanz.ja...@gmail.com] > Sent: Wednesday, November 22, 2017 12:50 PM > To: dev@ctakes.apache.org > Subject: Re: Interpret context out of clinical note [EXTERNAL] > > If I use Eclipse, at build time I also get the error > > method putAll(Map<? extends Annotation,? extends > List<IdentifiedAnnotation>>) in the type Map<Annotation,List< > IdentifiedAnnotation>> > is not applicable for the arguments (Map) > > I haven't looked into why. > > A quick workaround is to add a cast to Map > > allCovering.putAll( (Map)JCasUtil.indexCovering( jCas, covered, > covering ) ); > > > > > On Wed, Nov 22, 2017 at 8:40 AM, Finan, Sean < > sean.fi...@childrens.harvard.edu> wrote: > > > Hi Bhagwat, > > > > I have no idea what is going on with your system. > > > > > The method putAll(Map<? extends Annotation,? extends > > > List<IdentifiedAnnotation>>) in the type > > > Map<Annotation,List<IdentifiedAnnotation>> is not applicable for > > > the arguments (Map) > > > > That doesn't make any sense to me. That is exactly what putAll is > > for ... Unless your uimafit does not return a typed map? In which > > case it is an old version? I am not sure how that would happen. > > > > > When I run AssertionSubPipe.piper I am getting below error: > > The .piper files should all have line comments in them. The > > *SubPipe pipers should all have something like "This is not a > > complete pipeline" at the top. This means that it cannot be run > > alone. The annotators in the Assertion piper require several other > > annotators to run first. In addition to the default clinical piper > > I think that there are some piper files in ctakes-example-res that > > you can look at to > start. > > > > >, I don't find any variables value in understandable format like > > >(JCas > > jcas) object. How would I understand JCas object values? > > > > ctakes is built upon the Apache UIMA framework. > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__uima.apache.org > > _& > > d=DwIBaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZst > > Tp > > yIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=rVKcbkbznwk6V-PLUy56sA4hGgN0F4qrLN5 > > Ik 6FIDnM&s=ebIFQbW0D4VLpTWv9a4YQqy_G30S_hDeDEbhCTesFuk&e= > > > > This should probably be on our wiki ... Anyway, the best way to > > learn about how ctakes pipelines are put together and how data is > > passed is to read some of the intro documentation for uima. > > > > The Javadoc for jcas is here: > > https://urldefense.proofpoint.com/v2/url?u=https-3A__uima.apache.org > > _d > > _&d=DwIBaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZ > > st > > TpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=rVKcbkbznwk6V-PLUy56sA4hGgN0F4qrL > > N5 Ik6FIDnM&s=I_7BH2bDGR48vI03bE1dirKGCgq33PKB9vXN2VDrMA8&e= > > uimaj-current/apidocs/org/apache/uima/jcas/JCas.html > > > > Sean > > > > > > > > > > > > > > -----Original Message----- > > From: Bhagwat Posane [mailto:bhagwat.pos...@gmail.com] > > Sent: Wednesday, November 22, 2017 3:38 AM > > To: dev@ctakes.apache.org > > Subject: Re: Interpret context out of clinical note [EXTERNAL] > > > > Hello Sean, > > > > Thank you for the inputs. I have gone through both the piper files > > which you have mentioned. > > > > When I run AssertionSubPipe.piper I am getting below error: > > > > //////////////////////////////////////////////////////////// > > //////////////////////////////////////////////////////////// > > //////////////////////////////////////////// > > > > 22 Nov 2017 12:55:31 WARN SingleDocumentProcessor - This class > > cannot be used until CTAKES-76 is implemented. > > 22 Nov 2017 12:55:31 WARN SingleDocumentProcessor - This class > > cannot be used until CTAKES-76 is implemented. > > Nov 22, 2017 12:55:31 PM > > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl > > callAnalysisComponentProcess(430) > > 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:412) > > at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl. > > processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:314) > > at org.apache.uima.analysis_engine.asb.impl.ASB_impl$ > AggregateCasIterator. > > processUntilNextOutputCas(ASB_impl.java:570) > > at org.apache.uima.analysis_engine.asb.impl.ASB_impl$ > > AggregateCasIterator.<init>(ASB_impl.java:412) > > at org.apache.uima.analysis_engine.asb.impl.ASB_impl. > > process(ASB_impl.java:344) > > at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl. > > processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265) > > at org.apache.uima.analysis_engine.asb.impl.ASB_impl$ > AggregateCasIterator. > > processUntilNextOutputCas(ASB_impl.java:570) > > at org.apache.uima.analysis_engine.asb.impl.ASB_impl$ > > AggregateCasIterator.<init>(ASB_impl.java:412) > > at org.apache.uima.analysis_engine.asb.impl.ASB_impl. > > process(ASB_impl.java:344) > > at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl. > > processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:265) > > at > > org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process( > > AnalysisEngineImplBase.java:269) > > at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline( > > SimplePipeline.java:150) > > at org.apache.ctakes.core.pipeline.PipelineBuilder.run( > > PipelineBuilder.java:348) > > at org.apache.ctakes.core.pipeline.PiperFileRunner.run( > > PiperFileRunner.java:72) > > at org.apache.ctakes.core.pipeline.PiperFileRunner.main( > > PiperFileRunner.java:30) > > Caused by: java.lang.NullPointerException at org.apache.ctakes.assertion. > > medfacts.AssertionAnalysisEngineFit.process( > > AssertionAnalysisEngineFit.java:145) > > at > > org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process( > > JCasAnnotator_ImplBase.java:48) > > at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl. > > callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:396) > > ... 14 more > > > > //////////////////////////////////////////////////////////// > > //////////////////////////////////////////////////////////// > > //////////////////////////////////////////////////////////// > > /////////////////////// > > > > The error is causing due to the command : add > > AssertionAnalysisEngineFit I have comment out this command and ran > > it, the html output doesn't have any difference with previous output. > > Could you please help me to resolve this error. > > > > > > On 21 November 2017 at 18:43, Finan, Sean <Sean.Finan@childrens.harvard. > > edu> > > wrote: > > > > > Hi Bhagwat, > > > > > > You can visit the ctakes-assertion-res module for some clues. > > > > > > Navigate to ctakes-assertion-res src/main/resources/ > > > org/apache/ctakes/assertion/pipeline/ > > > > > > There are two .piper files there. Each one covers a different way > > > to get the information that Tim mentioned. In those files each "add" > > > statement is followed by an annotator class name. In IntelliJ you > > > can press CTRL-N and enter the class name to view the code. There > > > are also a few comments in the piper files that may help. > > > > > > Sean > > > > > > -----Original Message----- > > > From: Bhagwat Posane [mailto:bhagwat.pos...@gmail.com] > > > Sent: Tuesday, November 21, 2017 6:21 AM > > > To: dev@ctakes.apache.org > > > Subject: Interpret context out of clinical note [EXTERNAL] > > > > > > Hello Sean,Tim, et al, > > > > > > I would like to Interpret context out of clinical note, e.g. > > > interpretation of the procedure, lab tests for a patient. For > > > this, I suppose TLINK statements would be of much help. > > > > > > Ex. for the note- "Cystoscopy is planned on 3 / 26 / 2018." > > > I get TLINK as > > > Cystoscopy contains 3 / 26 / 2018, > > > 3 / 26 / 2018 contains Cystoscopy > > > 3 / 26 / 2018 contains planned > > > we can make out that Cystoscopy is not yet done looking at > > > "planned"(in this case), > > > > > > Could you please let me know if I am on right path and also help > > > me understand if any other approach to do this. > > > > > > > > > @Tim, > > > Couple of days back you mentioned about the context understanding : > > > > > > "if any procedure is happened or not." > > > > I think you need a formal definition of this to understand what > > > > you're trying to do. > > > > As a guess, you want it to be in the past, related to the > > > > patient (not a family member), and not negated or hypothetical > > > > or uncertain, > > etc.? > > > > This would require multiple components, but most of them should > > > > run in the temporal pipeline. > > > > > > > > > > Tim > > > > > > > > > Could you please provide some insight on this, as what are the > > > multiple components are required and how to use them to achieve > > > this > > goal. > > > > > > -- > > > Thanks, > > > Bhagwat Posane > > > > > > > > > > > -- > > Thanks, > > Bhagwat Posane > > > -- Thanks, Bhagwat Posane