Hi Deepal, Take a peek at: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/ DictionaryLookupAnnotator.java And something like UmlsToSnomedConsumerImpl.java that creates/puts the UmlsConcept objects into the CAS...
But I presume you will most likely create a Brand new Annotator that will be added to the pipeline? Also, I would encourage upgrading new development against either trunk or at least 3.x (instead of 2.5). --Pei > -----Original Message----- > From: Deepal Dhariwal [mailto:[email protected]] > Sent: Wednesday, February 06, 2013 11:17 AM > To: [email protected] > Subject: Re: Information Extraction using ontology + Access Aggregate Plain > Text UMLS processor results - Concept Annotation > > Hello all, > > I am executing ctakes CPE from Eclipse i.e. ctakesCPEGUI.java. I want to > access and process the (UMLS) Concept Annotations and NumToken > Annotations. > I went through the src but couldnt find the the exact class which I would > need to modify to implement my Ontology Lookup Annotator. I want to > check each UMLS concept present in document, then check whether there is > a corresponding instance in Heartfaid Ontology and if so assert a fact about > the patient. > Kindly let me know how to programmatically access Concept Annotation > results. > > Thanks > Deepal Dhariwal > > > On Fri, Jan 18, 2013 at 12:50 PM, Chen, Pei > <[email protected]>wrote: > > > Hi Deepal, > > I am assuming the mapping would be through UMLS CUI's. > > For example, for each CUI identified by the cTAKES UMLS Dictionary > > Lookup annotator. > > > > Just putting some ideas out there: > > One would need a data structure to represent the Cardio Classes > > (perhaps a hashmap of some sort) that maps CUI's to the classes/instances. > > And then also a process to load that structure from the RDF (from > > either flat file, db, etc.) format? > > One might also need a place holder in the CAS (type system) to store > > the identified classes? > > > > --Pei > > > > > -----Original Message----- > > > From: Deepal Dhariwal [mailto:[email protected]] > > > Sent: Wednesday, January 16, 2013 11:21 AM > > > To: [email protected] > > > Subject: Re: Information Extraction using ontology > > > > > > Hello all, > > > > > > So what I am aiming is as follows: > > > 1. Extract UMLS medical terms from a given clinical narrative using > > ctakes > > > umls lookup annotator 2. Identify cardio vascular terms from above set. > > > These terms are classes / instances of heart failure ontology. I > > > want > > to make > > > this mapping generic so that if in future I am targeting > > > carcinogenic > > terms, I'll > > > would just need to change underlying ontology. > > > 3. Lastly I want to run a reasoner over the rdf triples obtained > > > from > > above > > > step. > > > > > > For example: Find the timi score of patient 1. Extract all medical > > > terms > > from > > > clinical narrative 2. Extract cardio vascular terms such as whether > > > the > > patient > > > has congestive heart failure, whether he is an active smoker etc. > > > using > > heart > > > failure ontology 3. Run the sparql query of form : > > > timi score = does patient have chf + age > 65 + active smoker? > > > > > > Hence I need guidance on an annotator that would map ctakes terms to > > > heart failure ontology and allow to run reasoner over it. Any > > > suggestions would be of great help. > > > > > > > > > Thanks > > > Deepal Dhariwal > > > > > > On Mon, Dec 31, 2012 at 9:00 AM, Lin, Chen > > > <[email protected]>wrote: > > > > > > > This mapping sounds very interesting and has potential usage for > > > > other projects. I will be curious to follow its progress. Thank > > > > you, Deepal, for digging this! > > > > > > > > Best, > > > > Chen > > > > > > > > Sent from my iPhone > > > > > > > > On Dec 30, 2012, at 6:43 AM, "Deepal Dhariwal" > > > > <[email protected]> > > > > wrote: > > > > > > > > > Hello Pei, > > > > > > > > > > I am aiming for an annotator that provides mapping between UMLS > > > > > CUI's and ontology classes. If I could write a generic code that > > > > > provides mapping between cTakes results and any ontology then it > > > > > might be useful to the community. > > > > > Let me know your views on this annotator. > > > > > > > > > > Thanks > > > > > Deepal Dhariwal > > > > > > > > > > On Fri, Dec 28, 2012 at 10:37 AM, Chen, Pei > > > > > <[email protected]>wrote: > > > > > > > > > >> Hi Deepal, > > > > >> If I understand correctly, you were planning to have an > > > > >> annotator that iterates through all of the UMLS CUI's > > > > >> identified by cTAKES and then map them to the heartfaid ontology > class/code. > > > > >> I am not aware of anything that does specifically this, but > > > > >> there is an open ticket that is trying to do something similar > > > > >> for Drugs classes (RxNorm to NDF-RT mapping) ( > > > > >> https://issues.apache.org/jira/browse/CTAKES-107). > > > > >> It does seem like something that may be useful for others if > > > > >> you would like to contribute that to the community though... > > > > >> > > > > >> --Pei > > > > >> > > > > >>> -----Original Message----- > > > > >>> From: Deepal Dhariwal [mailto:[email protected]] > > > > >>> Sent: Thursday, December 27, 2012 10:28 PM > > > > >>> To: [email protected] > > > > >>> Cc: [email protected] > > > > >>> Subject: Re: Information Extraction using ontology > > > > >>> > > > > >>> Hello Pei, > > > > >>> > > > > >>> The dictionary is an ontology i.e. a .owl file (Reference: > > > > >>> http://lis.irb.hr/heartfaid/ontology/) . I am not sure whether > > > > >>> it is > > > > >> subset of > > > > >>> UMLS but its definitely based on UMLS since they have > > > > >>> relations such as 'UMLS Synonym' > > > > >>> An example of mapping terms would be: > > > > >>> 1. UMLS lookup annotator returns 'Hypertension' as medical > > > > >>> concept.I > > > > want > > > > >>> to assert that it corresponds to Hypertension class on this > > > > >>> ontology > > > > >> whose > > > > >>> parent is Blood Pressure and relations include TreatedBy, > > > > >>> Could Include > > > > >> etc. > > > > >>> > > > > >>> Hence I want to build a annotator that provides mapping > > > > >>> between ctakes annotator results and owl classes. Does the > > > > >>> dictionary lookup component allow to plug in dictionaries in > > > > >>> .owl or .rdf > > format? > > > > >>> > > > > >>> Thanks > > > > >>> Deepal Dhariwal > > > > >>> > > > > >>> On Thu, Dec 27, 2012 at 10:31 AM, Chen, Pei > > > > >>> <[email protected]>wrote: > > > > >>> > > > > >>>> Hi Deepal, > > > > >>>> Within the dictionary lookup component, you can also plugin > > > > >>>> other custom dictionaries in additional to the UMLS ones. > > > > >>>> The dictionary itself can be in different formats (MySQL, > > > > >>>> HSQLDB, Lucene, CSV text file) and could be configured via the > xml files. > > > > >>>> Is this what you were referring to? Do you have an example > > > > >>>> of "mapping terms to the corresponding classes?" > > > > >>>> Just curious, Is the heart ontology a subset of UMLS? > > > > >>>> > > > > >>>> Thanks, > > > > >>>> --Pei > > > > >>>> > > > > >>>>> -----Original Message----- > > > > >>>>> From: Deepal Dhariwal [mailto:[email protected]] > > > > >>>>> Sent: Thursday, December 27, 2012 12:17 AM > > > > >>>>> To: [email protected]; > > > > >>>>> [email protected] > > > > >>>>> Subject: Information Extraction using ontology > > > > >>>>> > > > > >>>>> Hello all, > > > > >>>>> > > > > >>>>> I have a heart ontology and I want to extract terms from a > > > > >>>>> clinical text > > > > >>>> that > > > > >>>>> correspond to classes in the ontology. cTAKES UMLS Lookup > > > > >>>>> Annotator returns UMLS terms from a given piece of text. > > > > >>>>> Could I modify the > > > > >>>> annotator > > > > >>>>> to extract terms from the ontology and is there is some > > > > >>>>> other component > > > > >>>> of > > > > >>>>> cTAKES that would allow me to do so. I am trying to set up a > > > > >>>>> cTakes > > > > >>>> pipeline > > > > >>>>> where I first extract medical terms from text using UMLS > > > > >>>>> lookup then > > > > >>>> filter > > > > >>>>> cardio vascular terms and identify relations between them > > > > >>>>> using an > > > > >>>> ontology. > > > > >>>>> > > > > >>>>> Thanks > > > > >>>>> Deepal Dhariwal > > > > >>>> > > > > >> > > > > > >
