You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by Jeffrey Miller <je...@gmail.com> on 2019/08/20 20:14:47 UTC

Relating MeasurementAnnotations to other IdentifiedAnnotations

Hi,

Is there any configuration or component in cTAKES that can be used to
attribute a measurement annotation to another annotation that it applies
to? For example, for "2 mm incision" where we relate "2 mm" to "incision"?
It looks like there might be a roundabout way to find the head of the span
of the MeasurementAnnotation in the output of the dependency parser, but I
was wondering if this has been explored before? Perhaps the
RelationExtractor component?

I also have another more general question if anyone can help- how does the
structure of the cTAKES type system effect how cTAKES works? I am looking
for a general intuition of how the structure of the typesystem drives the
larger cTAKES architecture?

Thanks!
Jeff

Re: Relating MeasurementAnnotations to other IdentifiedAnnotations [EXTERNAL]

Posted by "Miller, Timothy" <Ti...@childrens.harvard.edu>.
Jeff, I don't think such a thing exists yet. You are right that the RelationExtractor would probably be the best place to put it.

I don't know whether there is anything in the type system intended for this -- I took a quick look and maybe AttributeRelation is the closest thing I could find.

To answer your other question, I think the type system and the structure are the project are both designed by people who study language, NLP, information extraction, so they may be related in that that group of people probably has a lot in common. But since they were in fact many different people there are a lot of differences. My sense is that the type system was designed as more of a "top-down" exercise, while the modules are added more bottom-up as people get the motivation and resources to write them. Hope that is somewhat useful!

Tim

-----Original Message-----
From: Jeffrey Miller <jeffmax@gmail.com<mailto:Jeffrey%20Miller%20%3cjeffmax@gmail.com%3e>>
Reply-to: <de...@ctakes.apache.org>
To: dev@ctakes.apache.org<ma...@ctakes.apache.org>
Subject: Relating MeasurementAnnotations to other IdentifiedAnnotations [EXTERNAL]
Date: Tue, 20 Aug 2019 16:14:47 -0400


Hi,

Is there any configuration or component in cTAKES that can be used to
attribute a measurement annotation to another annotation that it applies
to? For example, for "2 mm incision" where we relate "2 mm" to "incision"?
It looks like there might be a roundabout way to find the head of the span
of the MeasurementAnnotation in the output of the dependency parser, but I
was wondering if this has been explored before? Perhaps the
RelationExtractor component?

I also have another more general question if anyone can help- how does the
structure of the cTAKES type system effect how cTAKES works? I am looking
for a general intuition of how the structure of the typesystem drives the
larger cTAKES architecture?

Thanks!
Jeff


Re: Relating MeasurementAnnotations to other IdentifiedAnnotations

Posted by Jeffrey Miller <je...@gmail.com>.
Thank you Peter and Tim, your responses were very helpful.

On Tue, Aug 20, 2019, 5:01 PM Peter Abramowitsch <pa...@gmail.com>
wrote:

> Hi Jeff
>
> I've experimented with three approaches.
>
> One is with the LabValueFinder which is included in the cTakes release -
> that looks specifically for values associated with LabMentions.  It also
> has an "eager" mode where it converts some MedicationMentions into
> LabMentions, when the context seems right.  O2, Sodium etc.   I can't say
> it works all that well and it is not capable of many different semantic
> forms of the Name/Value association.  It is also too eager.. sometimes
> creating LabMentions out of Medications when it shouldn't.
>
> Another approach was to use something like Stanford's TokensRegex, that
> allows you to construct regex-like rules where the segments are not strings
> but Tokens, where you can query the attributes like POS, and NER .   For
> Ctakes I had to adapt a UIMA package that must have been someone's thesis
> project from the university of Nantes.
>
> Copyright 2015 - CNRS (Centre National de Recherche Scientifique)
> package fr.univnantes.lina.uima.tkregex
>
> What I have is not ready for prime time and is still very rough.  It works
> well but only for a limited set of rules
>
> I used it to create a vitals detector.  Here's a snippet of the rules that
> this package loads in at runtime, that creates an annotation called WGT
> given these matchers
> matcher NUM: [ postag == "CD" ];
> matcher BE: [ lemma == "be" | lemma == "at"];
> matcher WT: /(?i)^wt|^weight/;
> matcher WUOM: /(?i)^kg|^lb|^pounds/;
> term "WGT": WT BE? SYM? NUM WUOM;
>
> The last approach was a home-built mechanism using the ConllDependencyNode
> collection and the RelationArguments to detect the same connection between
> certain typed pairs of Identified annotations.
>
> Problem is. I've always been in prototyping mode and never had time to push
> these methods to production ready status
>
> Peter
>
> On Tue, Aug 20, 2019 at 1:15 PM Jeffrey Miller <je...@gmail.com> wrote:
>
> > Hi,
> >
> > Is there any configuration or component in cTAKES that can be used to
> > attribute a measurement annotation to another annotation that it applies
> > to? For example, for "2 mm incision" where we relate "2 mm" to
> "incision"?
> > It looks like there might be a roundabout way to find the head of the
> span
> > of the MeasurementAnnotation in the output of the dependency parser, but
> I
> > was wondering if this has been explored before? Perhaps the
> > RelationExtractor component?
> >
> > I also have another more general question if anyone can help- how does
> the
> > structure of the cTAKES type system effect how cTAKES works? I am looking
> > for a general intuition of how the structure of the typesystem drives the
> > larger cTAKES architecture?
> >
> > Thanks!
> > Jeff
> >
>

Re: Relating MeasurementAnnotations to other IdentifiedAnnotations

Posted by Peter Abramowitsch <pa...@gmail.com>.
Hi Jeff

I've experimented with three approaches.

One is with the LabValueFinder which is included in the cTakes release -
that looks specifically for values associated with LabMentions.  It also
has an "eager" mode where it converts some MedicationMentions into
LabMentions, when the context seems right.  O2, Sodium etc.   I can't say
it works all that well and it is not capable of many different semantic
forms of the Name/Value association.  It is also too eager.. sometimes
creating LabMentions out of Medications when it shouldn't.

Another approach was to use something like Stanford's TokensRegex, that
allows you to construct regex-like rules where the segments are not strings
but Tokens, where you can query the attributes like POS, and NER .   For
Ctakes I had to adapt a UIMA package that must have been someone's thesis
project from the university of Nantes.

Copyright 2015 - CNRS (Centre National de Recherche Scientifique)
package fr.univnantes.lina.uima.tkregex

What I have is not ready for prime time and is still very rough.  It works
well but only for a limited set of rules

I used it to create a vitals detector.  Here's a snippet of the rules that
this package loads in at runtime, that creates an annotation called WGT
given these matchers
matcher NUM: [ postag == "CD" ];
matcher BE: [ lemma == "be" | lemma == "at"];
matcher WT: /(?i)^wt|^weight/;
matcher WUOM: /(?i)^kg|^lb|^pounds/;
term "WGT": WT BE? SYM? NUM WUOM;

The last approach was a home-built mechanism using the ConllDependencyNode
collection and the RelationArguments to detect the same connection between
certain typed pairs of Identified annotations.

Problem is. I've always been in prototyping mode and never had time to push
these methods to production ready status

Peter

On Tue, Aug 20, 2019 at 1:15 PM Jeffrey Miller <je...@gmail.com> wrote:

> Hi,
>
> Is there any configuration or component in cTAKES that can be used to
> attribute a measurement annotation to another annotation that it applies
> to? For example, for "2 mm incision" where we relate "2 mm" to "incision"?
> It looks like there might be a roundabout way to find the head of the span
> of the MeasurementAnnotation in the output of the dependency parser, but I
> was wondering if this has been explored before? Perhaps the
> RelationExtractor component?
>
> I also have another more general question if anyone can help- how does the
> structure of the cTAKES type system effect how cTAKES works? I am looking
> for a general intuition of how the structure of the typesystem drives the
> larger cTAKES architecture?
>
> Thanks!
> Jeff
>