Hi Bhagwat, The ctakes-temporal module has the components needed to generate tlinks. Using trunk, the following can be added to the end of the default clinical pipeline piper file (or a copy):
load TemporalSubPipe The TemporalSubPipe.piper file contains the following setup to create events, times, time relative to document writing (doctimerel) and tlinks: /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Commands and parameters to create a default temporal processing sub-pipeline. This is not a full pipeline. // 'Generic' Events. Use addDescription and let the EventAnnotator set itself up with defaults. addDescription EventAnnotator // Times. There aren't default models, so set specifically add BackwardsTimeAnnotator classifierJarPath=/org/apache/ctakes/temporal/ae/timeannotator/model.jar // DocTimeRel: the relation bin for Events to the Document Creation Time. add DocTimeRelAnnotator classifierJarPath=/org/apache/ctakes/temporal/ae/doctimerel/model.jar // Event - Time binary relations. add EventTimeRelationAnnotator classifierJarPath=/org/apache/ctakes/temporal/ae/eventtime/model.jar // Event - Event binary relations. add EventEventRelationAnnotator classifierJarPath=/org/apache/ctakes/temporal/ae/eventevent/model.jar /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// To see the code used for tlink detection, search ctakes for the EventTimeRelationAnnotator.java and EventEventRelationAnnotator.java classes. All piper "add" commands are followed by a class name. I have a piper file that I use for testing a 'full' ctakes pipeline: /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Advanced Tokenization: Regex sectionization, BIO Sentence Detector (lumper), Paragraphs, Lists load AdvancedTokenizerPipeline // Always need these ... add ContextDependentTokenizerAnnotator add POSTagger // Chunkers load ChunkerSubPipe // Default fast dictionary lookup set minimumSpan=2 load DictionarySubPipe // Cleartk Entity Attributes (negation, uncertainty, etc.) load AttributeCleartkSubPipe // Entity Relations (degree/severity, anatomical location) load RelationSubPipe // Temporal (event, time, dtr, tlink) load TemporalSubPipe // Coreferences (e.g. patient = he) load CorefSubPipe // Html output add pretty.html.HtmlTextWriter // XMI output writeXmis /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Sean -----Original Message----- From: Bhagwat Posane [mailto:bhagwat.pos...@gmail.com] Sent: Wednesday, November 08, 2017 2:41 AM To: dev@ctakes.apache.org Subject: Re: source code of user installation of cTakes. [EXTERNAL] [SUSPICIOUS] Hi Sean and Tim, Could you please provide your valuable inputs for below questions: I am interested in finding the context of clinical notes like if any procedure is happened or not. I think TLINKS values on web API maybe helpful to get the required result, not sure though. Please confirm I am not able to find the code to generate TLINKS, could you please help me locate the code. On 7 November 2017 at 16:18, Gandhi Rajan Natarajan < gandhi.natara...@arisglobal.com> wrote: > Hi Bhagwat, > > Glad that you got it working. > > Regarding cTAKES functional questions below, I guess Sean or Tim is > the right person to give more info. > > Regards, > Gandhi > > -----Original Message----- > From: Bhagwat Posane [mailto:bhagwat.pos...@gmail.com] > Sent: Tuesday, November 07, 2017 3:22 PM > To: dev@ctakes.apache.org > Subject: Re: source code of user installation of cTakes. [EXTERNAL] > [SUSPICIOUS] > > Thanks Gandhi, > > I have gone through both the links and able to get the results. > > I am interested in finding the context of clinical notes like if any > procedure is happened or not. > I think TLINKS values on web API maybe helpful to get the required > result, not sure though. Please confirm > > I am not able to find the code to generate TLINKS, could you please > help me locate the code. > > And also could anybody please guide me to find context out of the > note-sentence. > > On 3 November 2017 at 19:44, Gandhi Rajan Natarajan < > gandhi.natara...@arisglobal.com> wrote: > > > Hi Bhagwat, > > > > I'm not sure if it will help you. But I extended the code available > > in > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_heal > > thnlp_examples_tree_master_ctakes-2Dtemporal-2Ddemo&d=DwIBaQ&c=qS4go > > WBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r > > 0bcpKGd4f7d4gTao&m=Q-UMs2CriAdL_TaKVFqOnSOfqjR05AQWCnwqn6bOrBk&s=Wyt > > apFSqEoy1Za7AzcNuuMLQutzXpWTHlzSVl2Gw7zU&e= > > to get the XML output and parsed the required mentions for me like > > Procedure, Disorder etc. > > > > You can look at the code here - > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_&d=D > > wIBaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpy > > IisCYNYmQCP6r0bcpKGd4f7d4gTao&m=Q-UMs2CriAdL_TaKVFqOnSOfqjR05AQWCnwq > > n6bOrBk&s=YNBbaimyz_GjWzdMxuIgONTtHRvZiaguYc0pCoNiYjA&e= > > gandhirajan/cTAKES/tree/master/cTakes-Rest-Service/ > > src/main/java/com/ctakes/nlp and see if it helps. Cheers. > > > > Regards, > > Gandhi > > > > > > -----Original Message----- > > From: Bhagwat Posane [mailto:bhagwat.pos...@gmail.com] > > Sent: Friday, November 03, 2017 7:39 PM > > To: dev@ctakes.apache.org > > Subject: Re: source code of user installation of cTakes. [EXTERNAL] > > [SUSPICIOUS] > > > > Thank you Sean and Tim for your support. > > > > I have followed the links given by Sean and overview by Tim which > > is pretty helpful to get the better understanding of source code. > > > > I have run ctakes-example project that internally executes > > ClinicalPipelineFactory.getDefaultPipeline() method. This has given > > results like POS tag, Polarity, etc. > > Now, I am more interested in finding Procedure, Medication, Drug, etc. > > Could you please point me to the code file or help with code snippet > > to capture above terms. > > > > > > > > On 30 October 2017 at 19:36, Finan, Sean > > <sean.fi...@childrens.harvard.edu > > > > > wrote: > > > > > Hi Bhagwat, > > > > > > If you are interested in the default clinical pipeline, you can > > > look at the wiki here: > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__cwiki.apache. > > > org_confluence_display_CTAKES_&d=DwIBaQ&c=qS4goWBT7poplM69zy_3xhKw > > > EW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao& > > > m=Q-UMs2CriAdL_TaKVFqOnSOfqjR05AQWCnwqn6bOrBk&s=VdNz5x7XXCD3trfx4P > > > oJCYVmL-_RYlSoCOOPf-i_tMs&e= > > > Default+Clinical+Pipeline > > > For a visual representation of what Tim described. > > > > > > The AEs used for the ctakes 4.0 default clinical pipeline are > > > shown at the bottom of this wiki page: > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__cwiki.apache. > > > org_&d=DwIBaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67 > > > GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=Q-UMs2CriAdL_TaKVFqOnSOf > > > qjR05AQWCnwqn6bOrBk&s=1hU1X63Qu3ZRVgWTSJd9uxe-X5W-hKlf24gMo6GhJws& > > > e= confluence/display/CTAKES/Piper+Files > > > The Class names are shown, but not the packages. If you have a > > > decent IDE they should be easy to find - for Intellij press CTRL-N > > > and type the name of the class. > > > > > > Another option is to use the Simple Pipeline Fabricator gui to > > > look at the available readers and AEs and see what they do (and > > > their required inputs). Check the wiki at: > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__cwiki.apache. > > > org_&d=DwIBaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67 > > > GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=Q-UMs2CriAdL_TaKVFqOnSOf > > > qjR05AQWCnwqn6bOrBk&s=1hU1X63Qu3ZRVgWTSJd9uxe-X5W-hKlf24gMo6GhJws& > > > e= confluence/display/CTAKES/Simple+Pipeline+Fabricator+GUI > > > If you launch the gui and let it gather information, you can look > > > at the pipe bit names and descriptions (reader, AE). If it > > > interests you, click the "add" button (big '+') and on the right > > > you will see the path to the source code for that bit of the > > > pipeline. Not all AEs > > are described ... > > > calling all community ... but I think that most are. > > > > > > Sean > > > > > > > > > -----Original Message----- > > > From: Miller, Timothy > > > [mailto:timothy.mil...@childrens.harvard.edu] > > > Sent: Monday, October 30, 2017 9:48 AM > > > To: dev@ctakes.apache.org > > > Subject: Re: source code of user installation of cTakes. > > > [EXTERNAL] [SUSPICIOUS] > > > > > > cTAKES is based on Apache UIMA, which is a pipeline-building tool. > > > So the output you see in the CVD is the result of many different > > > pieces of the pipeline run in succession, and they are each in > > > different modules of cTAKES. ctakes-core has the most basic > > > elements that will run for every pipeline -- tokens, sentences, etc. > > > ctakes-dictionary-lookup-fast is what maps text spans to UMLS concepts. > > ctakes-assertion finds negation status. > > > ctakes-chunker creates syntactic chunks and ctakes-pos-tagger > > > finds part-of-speech tags for tokens. There are many others but I > > > think this covers the basics. In general, if you see a type in the > > > CVD that you find interesting, your best bet is to grep the code > > > for that type and see where it is being created (if you don't want > > > to wait for an email > > from the list). > > > Pipeline components are known as "Analysis Engines" (AEs) in UIMA > > > lingo and as a result are often in a package ending in .ae. > > > Hope this helps you navigate the code! > > > Tim > > > > > > ________________________________________ > > > From: Bhagwat Posane <bhagwat.pos...@gmail.com> > > > Sent: Monday, October 30, 2017 7:24 AM > > > To: dev@ctakes.apache.org > > > Subject: Re: source code of user installation of cTakes. > > > [EXTERNAL] > > > > > > Thanks Gandhi, for the quick response. > > > > > > I have source code of cTAKES which is available under > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__svn. > > > apache.org_repos_asf_ctakes_trunk&d=DwIBaQ&c=qS4goWBT7poplM69zy_ > > > 3xhKwEW14JZMSdioCoppxeFU&r=Heup-IbsIg9Q1TPOylpP9FE4GTK- > > > OqdTDRRNQXipowRLRjx0ibQrHEo8uYx6674h&m=Efsfuj37pWNoR_ > > > 6AidMyWm4ab03VgFjoRDFcJxdS9k0&s=ZquL0hWuNhJGyujJCmNBTCENaERN6B > > > U3zisHhnM18Wo&e=. I see there are many projects in it. > > > > > > I am checking user version using > > > \CTAKES_HOME\bin\runctakesCVD.bat, > > > this opens an UI. I could run analysis engine for a clinical note > > > according to the guidelines in the user-install guide.. > > > It gives me descent result in the left pane of the UI. > > > Now I am looking for the source-code that gives this result for a > > > clinical note. Could you please point me to the project, where can > > > I see to it in the ctakes-trunk or so. > > > > > > > > > > > > On 30 October 2017 at 16:36, Gandhi Rajan Natarajan < > > > gandhi.natara...@arisglobal.com> wrote: > > > > > > > Hi Bhagwat, > > > > > > > > The source code of cTAKES is available under > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__svn.apache. > > > > or > > > > g_ > > > > re > > > > pos_&d=DwIBaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=He > > > > up > > > > -I > > > > bs > > > > Ig9Q1TPOylpP9FE4GTK-OqdTDRRNQXipowRLRjx0ibQrHEo8uYx6674h&m=Efsfu > > > > j3 > > > > 7p > > > > WN > > > > oR_6AidMyWm4ab03VgFjoRDFcJxdS9k0&s=O0hR4sqek-qxWLs6iyaqEJz4RPgCh > > > > sB > > > > LY > > > > IC > > > > TCQHnrmw&e= > > > > asf/ctakes/trunk > > > > > > > > Regarding the resources to start off, cTAKES official site > > > > documentations should be fine. > > > > > > > > I also feel, mailing list is the one stop shop for all your > > > > other detailed queries. > > > > > > > > Regards, > > > > Gandhi > > > > > > > > > > > > -----Original Message----- > > > > From: Bhagwat Posane [mailto:bhagwat.pos...@gmail.com] > > > > Sent: Monday, October 30, 2017 4:30 PM > > > > To: dev@ctakes.apache.org > > > > Subject: source code of user installation of cTakes. > > > > > > > > Hello, > > > > > > > > I have seen the results of user installation of cTakes , the > > > > output is pretty interesting. > > > > > > > > Can anybody point to the source code of the same? > > > > > > > > I have just started exploring this project if anybody point me > > > > to good resources to understand it thoroughly that will be great > > help....!! > > > > > > > > I have downloaded the developer installation too. > > > > > > > > -- > > > > Thanks, > > > > Bhagwat Posane > > > > This email and any files transmitted with it are confidential > > > > and intended solely for the use of the individual or entity to > > > > whom they are > > > addressed. > > > > If you are not the named addressee you should not disseminate, > > > > distribute or copy this e-mail. Please notify the sender or > > > > system manager by email immediately if you have received this > > > > e-mail by mistake and delete this e-mail from your system. If > > > > you are not the intended recipient you are notified that > > > > disclosing, copying, distributing or taking any action in > > > > reliance on the contents of this information is strictly prohibited and > > > > against the law. > > > > > > > > > > > > > > > > -- > > > Thanks, > > > Bhagwat Posane > > > > > > > > > > > -- > > Thanks, > > Bhagwat Posane > > This email and any files transmitted with it are confidential and > > intended solely for the use of the individual or entity to whom they > > are > addressed. > > If you are not the named addressee you should not disseminate, > > distribute or copy this e-mail. Please notify the sender or system > > manager by email immediately if you have received this e-mail by > > mistake and delete this e-mail from your system. If you are not the > > intended recipient you are notified that disclosing, copying, > > distributing or taking any action in reliance on the contents of > > this information is strictly prohibited and against the law. > > > > > > -- > Thanks, > Bhagwat Posane > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they are > addressed. > If you are not the named addressee you should not disseminate, > distribute or copy this e-mail. Please notify the sender or system > manager by email immediately if you have received this e-mail by > mistake and delete this e-mail from your system. If you are not the > intended recipient you are notified that disclosing, copying, > distributing or taking any action in reliance on the contents of this > information is strictly prohibited and against the law. > -- Thanks, Bhagwat Posane