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 8234210195 for ; Fri, 21 Mar 2014 16:58:21 +0000 (UTC) Received: (qmail 86572 invoked by uid 500); 21 Mar 2014 16:57:53 -0000 Delivered-To: apmail-ctakes-dev-archive@ctakes.apache.org Received: (qmail 85731 invoked by uid 500); 21 Mar 2014 16:57:43 -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 85714 invoked by uid 99); 21 Mar 2014 16:57:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2014 16:57:41 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [129.176.114.198] (HELO mail10.mayo.edu) (129.176.114.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2014 16:57:35 +0000 Received: from unknown (HELO mail10.mayo.edu) ([10.146.65.139]) by ironport10-dlp.mayo.edu with ESMTP; 21 Mar 2014 11:57:16 -0500 Message-Id: <6e55ab$8iojj7@ironport10.mayo.edu> X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEALJuLFMKgNEM/2dsb2JhbABZg0HDNoErdIIlAQEBBDoCATUTBAIBCA0EBAEBKAchJQkIAgQTh2UDFgjIQg1XhjOMaYFtMgaCd4E7BJZbAYhhhXSIdg Received: from unknown (HELO msgoms03.mayo.edu) ([10.128.209.12]) by ironport10.mayo.edu with ESMTP; 21 Mar 2014 11:57:16 -0500 Date: Fri, 21 Mar 2014 16:57:11 +0000 From: "Masanz, James J." Subject: RE: getSeverity etc. for relation extractor In-reply-to: <924DE05C19409B438EB81DE683A942D9106B2003@CHEXMBX1A.CHBOSTON.ORG> To: "'dev@ctakes.apache.org'" MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-language: en-US Content-transfer-encoding: quoted-printable Accept-Language: en-US Thread-topic: getSeverity etc. for relation extractor Thread-index: AQHPQ5yCuhK0W71m3kOkmruDNC7m55ros0YAgABmgoD//9oUYIABFA7ggABKfCCAAFhYgIABGM0w X-MS-Has-Attach: X-MS-TNEF-Correlator: References: <924DE05C19409B438EB81DE683A942D9106AD237@CHEXMBX1A.CHBOSTON.ORG> <924DE05C19409B438EB81DE683A942D9106AEA7F@CHEXMBX1A.CHBOSTON.ORG> <6e55ab$8il34q@ironport10.mayo.edu> <924DE05C19409B438EB81DE683A942D9106B2003@CHEXMBX1A.CHBOSTON.ORG> X-CFilter-Loop: Reflected X-Virus-Checked: Checked by ClamAV on apache.org 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]=20 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 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 (now > separate indexes instead of one for all binary text relations) so I had t= o > 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 fo= r > 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 template filler? > It would seem more intuitive and faster than iterating through the relati= ons > afterwards again. > 2)Chase brought up a good point, should we add some of the commonly > used components to the defaultpipeline? (DrugNER, RelationExtractor, > 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 > > 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 > > > template-filler module, and I specified the relation extractor > > > pipeline that I was using before from the relation-extractor project > > > (there is also a different one in the template-filler 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 not > > > included by default? It seems confusing that there are getters for > > > properties that aren't set in general ...even when one runs the > > > default clinical pipeline instead of the 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 > > > > 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-fille > > > > r/ > > > > sr > > > > c/main/java/org/apache/ctakes/template/filler/ae/TemplateFillerAnn > > > > 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 > > > > > DiseaseDisorderMention, not BinaryTextRelations since I want 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 > > > > > "getSeverity()". I > > > > am > > > > > using the example text "He had a slight fracture in the proximal > > > > > right > > > > fibula". > > > > > When I iterate over BinaryTextRelations, I see the following > > > > > 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 > > > >