RE: getSeverity etc. for relation extractor

2014-03-24 Thread Finan, Sean
Hi James, I don't have an exact phrase to use.  We used the location_of with a 
brain aneurysm project, but the corpus is elsewhere now.  However, it would tag 
things such as [aneurysm] : [middle cerebral artery] and [aneurysm] : [cerebral 
artery] - which is different from arm/leg, but an example of 2 locations for 
one entity.  

From: Masanz, James J. [masanz.ja...@mayo.edu]
Sent: Monday, March 24, 2014 11:05 AM
To: 'dev@ctakes.apache.org'
Subject: RE: getSeverity etc. for relation extractor

I ran  3.1  against pain in arm and leg and I get just one location_of 
relation.
And again no location_of relations for rash on arm and leg

Sean, what was the exact phrase you used with the  incubator version? (or was 
that a while ago and lost)

-Original Message-
From: Finan, Sean [mailto:sean.fi...@childrens.harvard.edu]
Sent: Friday, March 21, 2014 3:59 PM
To: dev@ctakes.apache.org
Subject: RE: getSeverity etc. for relation extractor

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 seem 
to find multiple locations for a single d/d.  Functionality may have changed 
since then.

Thanks for all of your attention to this topic.

Sean

-Original Message-
From: Masanz, James J. [mailto:masanz.ja...@mayo.edu]
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 LocationOfTextRelation 
annotation with arg1=SignSymptomMention (pain) and arg2=AnatomicalSiteMention 
(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 example) or 
does the relation extractor need enhancement before it would create mutiple 
location_of for a single SignSymptomMention or DiseaseDisorderMention

BTW, I will have to debug the setting of bodyLocation in the code because even 
for pain in arm, when running from trunk, the LocationOfTextRelation 
annotation is being created, but the bodyLocation within the SignSymptomMention 
is not being set because the code in TemplateFillerAnnotator expects arg1 and 
arg2 to be swapped from what they currently are. I'll take a look at what it 
was in cTAKES 3.1 and find out if this is a bug in TemplateFillerAnnotator or 
something else.

-- James

-Original Message-
From: Finan, Sean [mailto:sean.fi...@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.ja...@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 
identified 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 least 
holding off until we have a definite, well-defined need (from a user).

I think instead, ideally, we would make the template filler smarter at picking 
which severity / which location  when there is more than one for the given 
identified annotation. Therefore I'd rather not make it a list now, when 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.c...@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 IdentifiedAnnotation?
Does the TemplateFiller component currently just take the last one in the list 
currently?
Should we modify the type system to support this in the future- something like 
the below?
A) Support many-to-one
B) Separate out getting the relations and getting the actual identified 
annotations.

One suggestion would be:
IdentifiedAnnotation.getBodyLocations(): FSArrayIdentifiedAnnotation
IdentifiedAnnotation.getBodyLocationRelations(): FSArrayLocationOfTextRelation
IdentifiedAnnotation.getSeverity(): FSArrayModifier
IdentifiedAnnotation.getSeverityRelations(): FSArrayDegreeOfTextRelation

What do others think?
--Pei

 -Original Message-
 From: Masanz, James J. [mailto:masanz.ja...@mayo.edu]
 

RE: getSeverity etc. for relation extractor

2014-03-24 Thread Masanz, James J.
For the text aneurysm in the middle cerebral artery
3.1 creates 3 location of relations
 aneurysm : middle cerebral artery
 aneurysm : cerebral artery
 aneurysm : artery

trunk also creates  3 location of relations
 aneurysm : middle cerebral artery
 aneurysm : cerebral artery
 aneurysm : artery

bodyLocation is not set for the IdentifiedAnnotation for aneurysm in either 
case.

I've created CTAKES-290

That jira issue will not address the fact the relation extractor does not 
create annotations for location of relations in Rash on arm and leg.
I'll leave that determination to someone more familiar with the relation 
extractor

-- James

-Original Message-
From: Finan, Sean [mailto:sean.fi...@childrens.harvard.edu] 
Sent: Monday, March 24, 2014 12:52 PM
To: dev@ctakes.apache.org
Subject: RE: getSeverity etc. for relation extractor

Hi James, I don't have an exact phrase to use.  We used the location_of with a 
brain aneurysm project, but the corpus is elsewhere now.  However, it would tag 
things such as [aneurysm] : [middle cerebral artery] and [aneurysm] : [cerebral 
artery] - which is different from arm/leg, but an example of 2 locations for 
one entity.  

From: Masanz, James J. [masanz.ja...@mayo.edu]
Sent: Monday, March 24, 2014 11:05 AM
To: 'dev@ctakes.apache.org'
Subject: RE: getSeverity etc. for relation extractor

I ran  3.1  against pain in arm and leg and I get just one location_of 
relation.
And again no location_of relations for rash on arm and leg

Sean, what was the exact phrase you used with the  incubator version? (or was 
that a while ago and lost)

-Original Message-
From: Finan, Sean [mailto:sean.fi...@childrens.harvard.edu]
Sent: Friday, March 21, 2014 3:59 PM
To: dev@ctakes.apache.org
Subject: RE: getSeverity etc. for relation extractor

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 seem 
to find multiple locations for a single d/d.  Functionality may have changed 
since then.

Thanks for all of your attention to this topic.

Sean

-Original Message-
From: Masanz, James J. [mailto:masanz.ja...@mayo.edu]
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 LocationOfTextRelation 
annotation with arg1=SignSymptomMention (pain) and arg2=AnatomicalSiteMention 
(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 example) or 
does the relation extractor need enhancement before it would create mutiple 
location_of for a single SignSymptomMention or DiseaseDisorderMention

BTW, I will have to debug the setting of bodyLocation in the code because even 
for pain in arm, when running from trunk, the LocationOfTextRelation 
annotation is being created, but the bodyLocation within the SignSymptomMention 
is not being set because the code in TemplateFillerAnnotator expects arg1 and 
arg2 to be swapped from what they currently are. I'll take a look at what it 
was in cTAKES 3.1 and find out if this is a bug in TemplateFillerAnnotator or 
something else.

-- James

-Original Message-
From: Finan, Sean [mailto:sean.fi...@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.ja...@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 
identified 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 least 
holding off until we have a definite, well-defined need (from a user).

I think instead, ideally, we would make the template filler smarter at picking 
which severity / which location  when there is more than one for the given 
identified annotation. Therefore I'd rather not make it a list now, when 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.c...@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