Return-Path: X-Original-To: apmail-ctakes-dev-archive@www.apache.org Delivered-To: apmail-ctakes-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B490410D08 for ; Fri, 21 Mar 2014 20:59:32 +0000 (UTC) Received: (qmail 20424 invoked by uid 500); 21 Mar 2014 20:59:31 -0000 Delivered-To: apmail-ctakes-dev-archive@ctakes.apache.org Received: (qmail 20324 invoked by uid 500); 21 Mar 2014 20:59:31 -0000 Mailing-List: contact dev-help@ctakes.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ctakes.apache.org Delivered-To: mailing list dev@ctakes.apache.org Received: (qmail 20315 invoked by uid 99); 21 Mar 2014 20:59:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2014 20:59:31 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Sean.Finan@childrens.harvard.edu designates 134.174.13.91 as permitted sender) Received: from [134.174.13.91] (HELO mailsmtp1.childrenshospital.org) (134.174.13.91) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2014 20:59:26 +0000 Received: from pps.filterd (mailsmtp1.childrenshospital.org [127.0.0.1]) by mailsmtp1.childrenshospital.org (8.14.5/8.14.5) with SMTP id s2LKwOgx025485 for ; Fri, 21 Mar 2014 16:59:00 -0400 Received: from smtpbdc1.chboston.org (smtpbdc1.chboston.org [10.20.18.104]) by mailsmtp1.childrenshospital.org with ESMTP id 1jrue30m4r-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 21 Mar 2014 16:59:00 -0400 Received: from pps.filterd (smtpbdc1.chboston.org [127.0.0.1]) by smtpbdc1.chboston.org (8.14.5/8.14.5) with SMTP id s2LKt9V7030014 for ; Fri, 21 Mar 2014 16:58:59 -0400 Received: from chexhubcasbdc1.chboston.org (internal-bdc-nat-v2260.tch.harvard.edu [10.20.18.4]) by smtpbdc1.chboston.org with ESMTP id 1jr68h359q-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Fri, 21 Mar 2014 16:58:59 -0400 Received: from CHEXMBX4A.CHBOSTON.ORG ([fe80::39e4:467b:9f1b:f1e4]) by CHEXHUBCASBDC1.CHBOSTON.ORG ([::1]) with mapi id 14.03.0169.001; Fri, 21 Mar 2014 16:58:59 -0400 From: "Finan, Sean" To: "dev@ctakes.apache.org" Subject: RE: getSeverity etc. for relation extractor Thread-Topic: getSeverity etc. for relation extractor Thread-Index: AQHPQ5yFRGhO22qeZEqlvkUIX/SIKZros0YAgABmgoD//9oUYIABFA7ggACOBQCAAAQMgIABbw2A///FdMCAAHbZAP//wwpw Date: Fri, 21 Mar 2014 20:58:58 +0000 Message-ID: <393252F14C42F946952F1ED75D316CAD390328CB@CHEXMBX4A.CHBOSTON.ORG> References: <924DE05C19409B438EB81DE683A942D9106AD237@CHEXMBX1A.CHBOSTON.ORG> <924DE05C19409B438EB81DE683A942D9106AEA7F@CHEXMBX1A.CHBOSTON.ORG> <6e55ab$8il34q@ironport10.mayo.edu> <924DE05C19409B438EB81DE683A942D9106B2003@CHEXMBX1A.CHBOSTON.ORG> <6e55ab$8iojj7@ironport10.mayo.edu> <393252F14C42F946952F1ED75D316CAD39032873@CHEXMBX4A.CHBOSTON.ORG> <6e55ab$8ipru7@ironport10.mayo.edu> In-Reply-To: <6e55ab$8ipru7@ironport10.mayo.edu> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.23.143.26] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87,1.0.14,0.0.0000 definitions=2014-03-21_06:2014-03-21,2014-03-21,1970-01-01 signatures=0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87,1.0.14,0.0.0000 definitions=2014-03-21_06:2014-03-21,2014-03-21,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1403210121 X-Virus-Checked: Checked by ClamAV on apache.org Hi James, It is starting to resemble a row of falling dominoes ... I ran with an incubator version of the "location of" extractor and it did s= eem to find multiple locations for a single d/d. Functionality may have ch= anged since then. Thanks for all of your attention to this topic. Sean -----Original Message----- From: Masanz, James J. [mailto:Masanz.James@mayo.edu]=20 Sent: Friday, March 21, 2014 4:34 PM To: 'dev@ctakes.apache.org' Subject: RE: getSeverity etc. for relation extractor Running from trunk, I don't get any relations for "Rash on arm and leg" :( If I change the text to "pain in arm and leg" I get one LocationOfTextRelat= ion annotation with arg1=3DSignSymptomMention (pain) and arg2=3DAnatomicalS= iteMention (arm) Does the relation extractor support creating a 2nd relation involving pain = - the one between pain and leg (is this just an unfortunate choice of examp= le) or does the relation extractor need enhancement before it would create = mutiple location_of for a single SignSymptomMention or DiseaseDisorderMenti= on BTW, I will have to debug the setting of bodyLocation in the code because e= ven for "pain in arm", when running from trunk, the LocationOfTextRelation = annotation is being created, but the bodyLocation within the SignSymptomMen= tion is not being set because the code in TemplateFillerAnnotator expects a= rg1 and arg2 to be swapped from what they currently are. I'll take a look a= t what it was in cTAKES 3.1 and find out if this is a bug in TemplateFiller= Annotator or something else. -- James -----Original Message----- From: Finan, Sean [mailto:Sean.Finan@childrens.harvard.edu] Sent: Friday, March 21, 2014 12:30 PM To: dev@ctakes.apache.org Subject: RE: getSeverity etc. for relation extractor > until we have a definite, well-defined need (from a user). "Rash on arm and leg" > I don't follow what you mean by your item B) below [Rash].getLocationRelation() > [Rash : Arm] [Rash].getLocation() > [Arm] -----Original Message----- From: Masanz, James J. [mailto:Masanz.James@mayo.edu] Sent: Friday, March 21, 2014 12:58 PM To: 'dev@ctakes.apache.org' Subject: RE: getSeverity etc. for relation extractor Yes, if there is more than one severity or location relation for a given id= entified annotation, currently the template filler does just take the last = severity and or last location. I suggest not changing the type system to allow a list (FSArray), or at lea= st holding off until we have a definite, well-defined need (from a user).=20 I think instead, ideally, we would make the template filler smarter at pick= ing which severity / which location when there is more than one for the gi= ven identified annotation. Therefore I'd rather not make it a list now, whe= n in the long run I think it should be a single value. And in the meantime = if someone has a need, they can look through the relations. Pei, I don't follow what you mean by your item B) below -- James -----Original Message----- From: Chen, Pei [mailto:Pei.Chen@childrens.harvard.edu] Sent: Thursday, March 20, 2014 2:03 PM To: dev@ctakes.apache.org Subject: RE: getSeverity etc. for relation extractor Awesome! Thanks James... On Sean's point about many-to-one relationships. I think the current type = system only supports 1 degree_of and severity_of for each IdentifiedAnnotat= ion? =20 Does the TemplateFiller component currently just take the last one in the l= ist currently? Should we modify the type system to support this in the future- something l= ike the below? A) Support many-to-one B) Separate out getting the relations and getting the actual identified ann= otations. One suggestion would be: IdentifiedAnnotation.getBodyLocations(): FSArray IdentifiedAnnotation.getBodyLocationRelations(): FSArray IdentifiedAnnotation.getSeverity(): FSArray IdentifiedAnnotation.getSeverityRelations(): FSArray What do others think? --Pei > -----Original Message----- > From: Masanz, James J. [mailto:Masanz.James@mayo.edu] > Sent: Thursday, March 20, 2014 2:50 PM > To: 'dev@ctakes.apache.org' > Subject: RE: getSeverity etc. for relation extractor >=20 > I saw the jira was assigned to me and had a few minutes so I=20 > implemented a fix and committed. > It was more than just the one line. > The name of the index in which the binary text relations has changed=20 > (now separate indexes instead of one for all binary text relations) so=20 > I had to change which index was searched. >=20 > -----Original Message----- > From: Chen, Pei [mailto:Pei.Chen@childrens.harvard.edu] > Sent: Thursday, March 20, 2014 9:28 AM > To: dev@ctakes.apache.org > Subject: RE: getSeverity etc. for relation extractor >=20 > Thanks for confirm James. It seem like a bug... > Chase, > if you confirm if adding ddm.setSeverity(degreeOfTextRelation); works=20 > for you, I can commit the changes in trunk. >=20 > Which also brings up some interesting points: > 1) Should we populate IdentifiedAnnotation.severity() and > bodylocationof() Directly in RelationExtractorAnnotator instead of the te= mplate filler? > It would seem more intuitive and faster than iterating through the=20 > relations afterwards again. > 2)Chase brought up a good point, should we add some of the commonly=20 > used components to the defaultpipeline? (DrugNER, RelationExtractor,=20 > TemplateFiller)? Seems easier to get onboard I think. >=20 > --Pei >=20 >=20 > > -----Original Message----- > > From: Chen, Pei > > Sent: Wednesday, March 19, 2014 5:58 PM > > To: dev@ctakes.apache.org > > Subject: RE: getSeverity etc. for relation extractor > > > > Chase, > > I am not sure why or the reasoning behind this, but it might explain=20 > > why Severity is null for your DiseaseDisorderMention example: > > Line 319 in TemplateFillerAnnotator.java: > > > > If I'm reading this logic correctly, it will only populate severity for > > SignSymptomMention.... Can't think of why not to populate it if it ex= ists in > > the BinaryTextRelations- > > have you tried adding: ddm.setSeverity(degreeOfTextRelation); > > instead of logging the error ??? > > > > if (eventMention instanceof > > DiseaseDisorderMention) { > > DiseaseDisorderMention ddm =3D > > (DiseaseDisorderMention) eventMention; > > logger.error("Need to implement attr > for " + relation + " for > > DiseaseDisorderMention"); > > } else if (eventMention instanceof > > SignSymptomMention) { > > SignSymptomMention ssm =3D > > (SignSymptomMention) eventMention; > > > > ssm.setSeverity(degreeOfTextRelation); > > > > Would you mind opening a Jira attach a patch/test if it works for you? > > -Pei > > > > > -----Original Message----- > > > From: Chase Master [mailto:chasemaster9@gmail.com] > > > Sent: Wednesday, March 19, 2014 4:09 PM > > > To: dev@ctakes.apache.org > > > Subject: Re: getSeverity etc. for relation extractor > > > > > > Thanks, > > > I tried using the AggregateTemplateFiller.xml from the=20 > > > template-filler module, and I specified the relation extractor=20 > > > pipeline that I was using before from the relation-extractor=20 > > > project (there is also a different one in the template-filler=20 > > > project called "RelationExtractorAggregateWithoutOrangeBook"). > > > However, I don't see a difference, the severity is still null. > > > > > > Just wondering - is there some reason that the TemplateFiller is=20 > > > not included by default? It seems confusing that there are=20 > > > getters for properties that aren't set in general ...even when one=20 > > > runs the default clinical pipeline instead of the=20 > > > RelationExtractorAggregate, these getters are there, but there are no= relations. > > > > > > > > > Thanks > > > Chase > > > > > > > > > On Wed, Mar 19, 2014 at 1:04 PM, Chen, Pei > > > wrote: > > > > > > > If I remember correctly, I think those attributes were set in=20 > > > > IdentifiedAnnotation via: > > > > ctakes-template-filler/desc/analysis_engine/TemplateFillerAnnotator= . > > > > xm > > > > l > > > > One can look at the logic in: > > > > org.apache.ctakes.template.filler.ae.TemplateFillerAnnotator [1] > > > > > > > > Have you tried added that to the pipeline? > > > > > > > > [1] > > > > http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-template-fil > > > > le > > > > r/ > > > > sr > > > > c/main/java/org/apache/ctakes/template/filler/ae/TemplateFillerA > > > > nn > > > > ot > > > > at > > > > or.java > > > > > > > > --Pei > > > > > > > > > -----Original Message----- > > > > > From: Chase Master [mailto:chasemaster9@gmail.com] > > > > > Sent: Wednesday, March 19, 2014 1:56 PM > > > > > To: dev@ctakes.apache.org > > > > > Subject: getSeverity etc. for relation extractor > > > > > > > > > > Hi, > > > > > > > > > > I am trying to output the relations associated with > > > > DiseaseDisorderMentions > > > > > and other types. But I want to start by iterating over=20 > > > > > DiseaseDisorderMention, not BinaryTextRelations since I want=20 > > > > > to be sure > > > > to > > > > > find them all, even if they have no associated relation. > > > > > > > > > > I always get null when using any of the getters like=20 > > > > > "getSeverity()". I > > > > am > > > > > using the example text "He had a slight fracture in the=20 > > > > > proximal right > > > > fibula". > > > > > When I iterate over BinaryTextRelations, I see the following=20 > > > > > valid > > > > values: > > > > > BinaryTextRelation slightFracture =3D iterator.next(); > > > > > slightFracture.getArg1().getArgument().getCoveredText() is > "fracture" > > > > > slightFracture.getArg2().getArgument().getCoveredText() is "sligh= t". > > > > > However, for the "fracture" DiseaseDisorderMention, > > > > > getSeverity() is > > > > null. > > > > > If it wasn't, I would then grab > > > > > disease.getSeverity().getArg1().getArgument().getCoveredText() > > > > > , > > > > > or for Arg2. > > > > > > > > > > Thanks, > > > > > Chase > > > >