You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by Oleg Bogatiryov <ol...@ctco.lv> on 2017/03/06 09:18:43 UTC

[Relation_Extraction] RE: Ctakes relation extraction

Hi Dmitriy.

Thank you for your response.

I am using RelationExtractorPipeline class to generate xmi's.
I got good results for LocationOfRelationExtractorAnnotator and 
DegreeOfRelationExtratorAnnotator.

I've edited RelationExtractorAggregate.xml file with adding more annotators.
There are some results but category is displayed like "O".

For example working results:

class org.apache.ctakes.typesystem.type.relation.LocationOfTextRelation
Category: location_of
Argument1:	blood pressure
Role:	Argument
Argument2:	blood
Role:	Related_to


class org.apache.ctakes.typesystem.type.relation.DegreeOfTextRelation
Category: degree_of
Argument1:	anxiety
Role:	Argument
Argument2:	acute
Role:	Related_to



And non-properly working

class org.apache.ctakes.typesystem.type.relation.ManifestationOfTextRelation
Category: O
Argument1:	anxiety
Role:	Argument
Argument2:	anxiety
Role:	Related_to

class 
org.apache.ctakes.typesystem.type.relation.CausesBringsAboutTextRelation
Category: O
Argument1:	anxiety
Role:	Argument
Argument2:	symptoms
Role:	Related_to

Category is O.
Could you please help me with getting right results for other relations 
extraction annotators ?

I've attached my ae descriptors. They are primitive and included into 
RelationExtractionAggregate.xml.

Thanks in advance,
Oleg.


-----Original Message-----
From: Dligach, Dmitriy [mailto:ddligach@luc.edu]
Sent: Tuesday, February 28, 2017 1:58
To: dev@ctakes.apache.org
Subject: Re: Ctakes relation extraction

Hi Oleg,

You may want to look into learning about UIMA and UIMAFIT.

Once you are somewhat comfortable with these frameworks, take a look at the 
package:

ctakes/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/

There are several pipelines that may work for you (e.g. take a look at 
RelationExtractorPipeline.java). Many of them should generate XMI files 
which contain the relation annotations you are looking for. Once you have 
generated the XMI files, you can parse them using UIMAFIT. E.g. take a look 
at RelationAnnotationViewer.java which you should use as an example.

Hope this helps!

Dima



> On Feb 24, 2017, at 03:07, Oleg Bogatiryov <ol...@ctco.lv> 
> wrote:
>
> Hi Dmitriy.
>
> Thank you for your reply.
>
> I am not sure how can I extract location_of and degree_of.
> AggregateTemplateFiller doesn't return anything in CVD as well as
> TemporalAggregatePipeline.
> There is BinaryTextRelation class that as I understand should fill in
> relations but no data is displayed.
>
> I was trying to execute RelationExtractorPipelineSingleCas but it
> doesn't print anything related to relations.
>
> Could you please help me with extraction of relations from the med text ?
>
> As I am a new to ctakes and uima could you please provide step to step
> instructions and exact classes to use.
>
>
> Thanks in advance,
> Oleg.
>
> -----Original Message-----
> From: Dligach, Dmitriy [mailto:ddligach@luc.edu]
> Sent: 20 \u0444\u0435\u0432\u0440\u0430\u043b\u044f 2017 \u0433. 17:48
> To: dev@ctakes.apache.org
> Subject: Re: Ctakes relation extraction
>
> Hi Oleg,
>
> The relation extraction AE currently only handles location_of and
> degree_of relations as described here:
>
> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3994852/
>
> The dependencies are handled by the dependency parser (i.e. a separate
> module).
>
> So you\u2019ll need to run both and collect all annotated relations from
> the the CAS.
>
> Hope this helps.
>
> Dima
>
>
>
>> On Feb 20, 2017, at 01:31, Oleg Bogatiryov <ol...@ctco.lv>
>> wrote:
>>
>> Hello to everyone.
>>
>>
>>
>> I am pleased to join the group.
>>
>>
>>
>> I am trying to extract relation from the document.
>>
>> Ideally I'd like to get the graph or tree of dependencies/relations
>> from the clinical documents.
>>
>>
>>
>> Could you please let me know how can I achieve it ?
>>
>>
>>
>> I am able to run CVD and RelationExtractorAggregate analysis engine
>> but there is no useful information
>>
>> in results that can be used in order to build a relation graph.
>>
>>
>>
>> Thanks in advance,
>>
>> Oleg.
>>
>