ctakes-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Masanz, James J." <Masanz.Ja...@mayo.edu>
Subject RE: Concept annotation questions
Date Fri, 04 Oct 2013 09:45:48 GMT
Hi Dennis,

I put  a patch at

http://people.apache.org/~james-masanz/patches/ctakes-3.1.0-patches/

Note this patch is not an official release of the ASF or the Apache cTAKES project.

This patch includes a new feature called originalTextAsDelimitedString which contains the
original text, delimited by a vertical bar.  This is likely not how this function will be
implemented in a future release but gives you something to start with. (For discussion of
future implementation, refer to [1])

For text like this, with a typo of "colons" instead of just "colon"

Cancer of lower left colons

the DiseaseDisorderMention that covers that entire string will have 
 
originalTextAsDelimitedString ="Cancer|of|colons"

To use the patch, download it, verify the signature, and extract the contents to the same
directory where you have Apache cTAKES installed so that you have a new subdirectory called


ctakes-3.1.0.patch.01

After extracting the contents, your CTAKES_HOME should contain the following subdirectories:

bin
config
ctakes-3.1.0.patch.01
desc
lib
resources

Within ctakes-3.1.0.patch.01 are two .bat files showing how the classpath can be set to pick
up the patch.  If you use one of those .bat file, please edit the file and replace YourUmlsUserIdHere
 and  YourUmlsPasswordHere with your UMLS user ID and password

If you post any questions to the email list, please make sure to indicate that you are using
a modified version of Apache cTAKES.

-- James
[1] http://markmail.org/message/tvwbkfxuamiiwi7s


From: user-return-302-Masanz.James=mayo.edu@ctakes.apache.org [mailto:user-return-302-Masanz.James=mayo.edu@ctakes.apache.org]
On Behalf Of Dennis Lee Hon Kit
Sent: Monday, September 23, 2013 11:13 PM
To: user@ctakes.apache.org
Subject: Re: Concept annotation questions

Hi James,
 
We use the binary release.  Thank you for your help, we look forward to the update.
 
Regards,
Dennis
 
From: Masanz, James J. 
Sent: Friday, September 20, 2013 12:27 PM
To: mailto:user@ctakes.apache.org 
Subject: RE: Concept annotation questions
 
Dennis,
 
Now that I have the code written, one more question. Are you using the binary, or do you download
source and compile yourself?
 
-- James
 
From: user-return-286-Masanz.James=mayo.edu@ctakes.apache.org [mailto:user-return-286-Masanz.James=mayo.edu@ctakes.apache.org]
On Behalf Of Dennis Lee Hon Kit
Sent: Tuesday, September 10, 2013 12:19 PM
To: user@ctakes.apache.org
Subject: Re: Concept annotation questions
 
Hi James,
 
Thank you for your email.  We are currently using cTakes 3.0 but will upgrade to which ever
version you issue the patch for.  Thank you for taking the time out of your busy schedule
to work on the patch.
 
Regards,
Dennis
 
From: Masanz, James J. 
Sent: Monday, September 09, 2013 7:44 AM
To: mailto:user@ctakes.apache.org 
Subject: RE: Concept annotation questions
 
Which version of cTAKES are you using or planning to use.
 
cTAKES 3.1 has been approved and once the apache.org infrastructure team does some administrative-like
tasks the process of having the apache mirrors updated with 3.1 should start.
 
I want to target the release that will be most useful for you for this patch first. 
 
From: user-return-267-Masanz.James=mayo.edu@ctakes.apache.org [mailto:user-return-267-Masanz.James=mayo.edu@ctakes.apache.org]
On Behalf Of Dennis Lee Hon Kit
Sent: Friday, August 30, 2013 1:11 AM
To: user@ctakes.apache.org
Subject: Re: Concept annotation questions
 
Hi James,
 
Thank you for your reply.
 
If you could create the patch for identifying the words used in the matching that would be
great.  We understand you have other priorities and will wait until you have time to do it.
 
Thank you for logging the issue with the incorrect chunking as well.
 
Regards,
Dennis
 
-----Original Message----- 
From: Masanz, James J. 
Sent: Thursday, August 29, 2013 8:38 AM 
To: 'user@ctakes.apache.org' 
Subject: RE: Concept annotation questions 
 
I created JIRA issue CTAKES-231 for this as the code in trunk and in the cTAKES 3.1 branch
also get the chunking wrong.
https://issues.apache.org/jira/browse/CTAKES-231
 
Thanks,
-- James
 
From: user-return-258-Masanz.James=mayo.edu@ctakes.apache.org [mailto:user-return-258-Masanz.James=mayo.edu@ctakes.apache.org]
On Behalf Of Masanz, James J.
Sent: Thursday, August 29, 2013 9:19 AM
To: 'user@ctakes.apache.org'
Subject: RE: Concept annotation questions
 
Hi Dennis,
 
Thanks for explaining why you are interested in finding out which words in the original text
cause a particular concept to be annotated.  We are currently working on getting Apache cTAKES
3.1 out.  Depending on your timeline, after that is done, perhaps I could create a patch
for you that would help with determining which words from the text matched a dictionary entry,
rather than just the begin offset of the first word and the end offset of the last word.
 
As far as the chunking, the fact “liver” and “and” are being tagged as O-chunks explains
why the dictionary lookup component is not finding liver cancer or lung cancer in “cancer
of colon, liver and lung”
 
I’ll try that sentence with the latest chunker model (which will be in cTAKES 3.1) and see
if it assigns correct chunk tags for that sentence.
 
-- James
 
From: user-return-257-Masanz.James=mayo.edu@ctakes.apache.org [mailto:user-return-257-Masanz.James=mayo.edu@ctakes.apache.org]
On Behalf Of Dennis Lee Hon Kit
Sent: Wednesday, August 28, 2013 2:33 PM
To: user@ctakes.apache.org
Subject: Re: Concept annotation questions
 
Hi James & Pei,
 
Thank you for your replies and sorry for my late reply as I have been away.
 
Q1 – The longest span could work and is one of the options we are looking at but when there
are overlaps it can get complicated.  In the following example, the longest would work. 
We can take start with 01, and ignore 02 and 03 because their start positions overlap the
end position of 01, and then continue with 04.  But I don’t think it will always be this
straight forward as the being/end string positions may not always be a good indicator of what
exactly in the original text was coded.
 
00 Invasive ductal carcinoma of the left breast with bone metastases.
01 Invasive ductal carcinoma of the left breast                      
408643008|Infiltrating duct carcinoma of breast (disorder)|
02                                       breast with
bone             56873002|Bone structure of sternum (body structure)|
03                                       breast with
bone metastases  94297009|Secondary malignant neoplasm of female breast (disorder)|
04                                                  
bone metastases  94222008|Secondary malignant neoplasm of bone (disorder)|
 
Q2 – As we are beginners, we are not at the level where we are comfortable with modifying
cTakes or even know where to begin modifying cTakes but that would be an option in the future. 
Going back to the example of “cancer of liver” and using the begin/end position of the
string that was used to identify the concept, the original string would be “cancer of colon,
lung and liver.”  The CUI that was identified was C0345904, which has 209 (137 unique)
descriptions for all languages.  Examples of English terms include:
• CA - Liver cancer 
• Cancer of Liver 
• cancer of the liver 
• Cancer, Hepatic 
• CANCER, HEPATOCELLULAR 
• Malignant hepatic neoplasm 
• Malignant liver tumor 
• Malignant liver tumour 
• Malignant neoplasm of liver 
• malignant neoplasm of liver (diagnosis) 
• Malignant neoplasm of liver unspecified 
• Malignant neoplasm of liver unspecified (disorder) 
• Malignant neoplasm of liver, not specified as primary or secondary 
• Malignant neoplasm of liver, NOS 
• Malignant neoplasm of liver, unspecified 
• malignant neosplasm of the liver 
• Malignant tumor of liver 
• Malignant tumor of liver (disorder) 
• Malignant tumour of liver
It would seem suboptimal to go through each of the descriptions to try and determine which
was the UMLS term that was used in the coding.  It is important for us to know which part
of the string is matched because something like “Invasive ductal carcinoma of the left breast”
will be matched to the SNOMED CT concept “408643008|Infiltrating duct carcinoma of breast
(disorder)|”, but we would like to know that “left” was not matched and would like to
post-coordinate the expression to indicate the left breast, i.e.: 408643008|Infiltrating duct
carcinoma of breast (disorder)|:363698007|Finding site (attribute)|=80248007|Left breast structure
(body structure)|.  When there are other qualifiers like severity, chronicity and episodicity
that may be ignored when matching, we would like to capture it at the level of granularity
specified in the original text.
 
In terms of the chunking, here is what I see for “cancer of colon, lung and liver”:
• NP: cancer of colon, lung and liver 
• PP: of 
• NP: colon, lung and liver
For “cancer of colon, liver and lung” here is what I see:
• NP: cancer of colon, 
• PP: of 
• NP: colon 
• O: liver 
• O: and 
• NP: lung
Q3 – To answer Pei’s question, we are not looking at the preferred name from the UMLS,
just which term was used.
 
Regards,
Dennis
 
From: Chen, Pei 
Sent: Thursday, August 22, 2013 12:27 PM
To: user@ctakes.apache.org 
Subject: RE: Concept annotation questions
 
Also,
> 3)… or the exact description that was returned in the UMLS? 
I presume you mean to save the preferred name from UMLS?  If so, this seems to be a common
request- see: https://issues.apache.org/jira/browse/CTAKES-224
 
--Pei
 
From: Masanz, James J. [mailto:Masanz.James@mayo.edu] 
Sent: Thursday, August 22, 2013 3:24 PM
To: 'user@ctakes.apache.org'
Subject: RE: Concept annotation questions
 
 
Welcome to the cTAKES community.
 
Q1 – some people use the longest span. 
Q2 &Q3 – can you just use the text from the dictionary “Malignant neoplasm of liver
(disorder)“.  Alternatively you could modify cTAKES to save the text of the words that
it matches when it is performing dictionary lookup. I would guess there is a term in the UMLS
dictionary with the same code as Malignant neoplasm of liver (disorder) that just has the
words “cancer of liver”, but there isn’t anything in cTAKES to give that to you just
through a configuration change.
 
For “cancer of colon, liver and lung“, can you look at the chunk  tag for liver.  If
it’s in a separate noun phrase (NP) from “cancer of colon” that would account for why
cancer is not getting tied to liver in that case (but wouldn’t account for why the chunker
is creating as a separate noun phrase)
 
-- James
 
From: user-return-248-Masanz.James=mayo.edu@ctakes.apache.org [mailto:user-return-248-Masanz.James=mayo.edu@ctakes.apache.org]
On Behalf Of Dennis Lee Hon Kit
Sent: Wednesday, August 21, 2013 1:10 PM
To: user@ctakes.apache.org
Subject: Concept annotation questions
 
Hi Everyone,
 
We are new to cTakes so please bear with our questions.  We are using cTakes to annotate
things like encounter diagnoses and referral notes and are especially interested with the
SNOMED CT encodings.  But we are not sure how to make sense of all the outputs.
 
Example #1
 
In the example below, “cancer of colon, lung and liver” has been encoded with SNOMED CT
and additional concepts that do not apply have been removed (e.g., general “cancer” concept,
lung, colon and liver structures, etc).   They have been plotted out by the begin/end positions. 
If the terms to do not align, its probably because the email only accepts plain text and a
mono-spaced font is not the default.
 
cancer of colon, lung and liver
cancer of colon, lung and liver   93870000|Malignant neoplasm of liver (disorder)|
cancer of colon, lung             363358000|Malignant tumor of lung (disorder)|
cancer of colon                   363406005|Malignant tumor of colon (disorder)|
 
Question (1) – We had to do quite a bit of post-processing to remove inactive concepts,
subtype concepts, concepts that are part of the defining attributes, etc.  Are there a set
of guidelines to help sort out the CUI or SNOMED CT codes that have been identified?
Question (2) – How can we determine that “93870000|Malignant neoplasm of liver (disorder)|”
refers to “cancer of liver” as opposed to using the begin/end string, which points to
“cancer of colon, lung and liver”?  Certainly we can try to do additional parsing but
there are a lot of different scenarios to take into account.
Question (3) – This relates to question 2, are we able to identify the original terms that
were used for the concept matching or the exact description that was returned in the UMLS? 
While the CUI is helpful, the CUI can refer to tens or even hundreds of descriptions.
 
________________________________________
Example #2
 
Switching the position of colon, lung and liver can result in different encodings.  Once
again, after removing additional concepts not needed (i.e., “cancer” and “colon structure”),
we get the following.  What happened to liver and lung cancer?
 
cancer of colon, liver and lung
cancer of colon                   363406005|Malignant tumor of colon (disorder)|
                           lung   39607008|Lung structure (body
structure)|
 
We have more questions but will start with these.  Thank you in advance.
 
Regards,
Dennis
Mime
View raw message