You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by "Finan, Sean" <Se...@childrens.harvard.edu> on 2017/12/01 13:38:32 UTC

RE: Drug NER - Empty Dosage/Strength/Frequency Values [EXTERNAL]

Hi Chalal Arora,

You can change values in a piper file in two ways.

To set a value "globally" use the "set" command:
set DISTANCE=14
set BOUNDARY_ANN_TYPE=14

To set a value just for one annotator enter it on the "add" line:
add DrugMentionAnnotator DISTANCE=14 BOUNDARY_ANN_TYPE=14

If the DrugMentionAnnotator has not been refactored to a uimafit component then it may not work ... I haven't looked at that code but some of the older annotators do strange things.

https://cwiki.apache.org/confluence/display/CTAKES/Piper+Files

Sean

-----Original Message-----
From: Chahal Arora [mailto:chahal.arora@raxa.com] 
Sent: Friday, December 01, 2017 8:24 AM
To: dev@ctakes.apache.org
Subject: Re: Drug NER - Empty Dosage/Strength/Frequency Values [EXTERNAL]

Hi All,

While debugging DrugMentionAnnotator.java, I found that the issue was coming because the value of variables iWindowSize, iBoundaryAnnType have been set to -1 by default. The value of these variables does not change because in the following code I get null values for
*windowSize* and *boundaryAnnTypeName
*in the initialize method of DrugMentionAnnotator*.*

String windowSize = (String)annotCtx.getConfigParameterValue(DISTANCE);
String boundaryAnnTypeName
=(String)annotCtx.getConfigParameterValue(BOUNDARY_ANN_TYPE);

if(windowSize != null)
         iWindowSize = Integer.parseInt(windowSize);

if(boundaryAnnTypeName != null)
iBoundaryAnnType  = JCasUtil.getType(boundaryAnnTypeName);


The DrugNer worked for me when I changed the value of *iWindowSize*,
*iBoundaryAnnType* to the length of the input string.

Does anyone know how can I add this change from piper file and as far I can see the right way to do it is by changing the values of *DISTANCE* and
*BOUNDARY_ANN_TYPE* but I am not sure about this and don't know how to do it?

Can anyone help me with this?

Regards
Chahal Arora
Software Engineer
Raxa

Regards
Chahal Arora
Software Engineer
Raxa

On Thu, Nov 30, 2017 at 6:20 PM, Chahal Arora <ch...@raxa.com> wrote:

> Hi All,
>
> I am trying to use the Drug NER using the pipeline.  I am able to get 
> the medication mention 
> (org.apache.ctakes.typesystem.type.textsem.MedicationMention)
> and get the value for drug but the issue is that I am getting null 
> values for medication dosage/frequency/strength/duration.
>
> I have looked into some of the solution provided in the mailing list 
> but still the same result-
>
> 1) 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__mail-2Darchives.ap
> ache.org_mod-5Fmbox_ctakes-2Duser_201711.mbox_-25&d=DwIBaQ&c=qS4goWBT7
> poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKG
> d4f7d4gTao&m=-2rrvnxOquKSuy0j8mA2pAlrOSOTTCmQfJZda96Q_v8&s=S06l1VQ4SgP
> cBk2000e7WZYb55MKeayF5rFGmgjMxMY&e=
> 3Cb7d4354fde864bbba44d2427f281ae94@BLRKECMBX34.ad.infosys.com%3E
>
> 2) 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__dev.ctakes.apache.
> narkive.com_ixUkpiO5_enabling-2D&d=DwIBaQ&c=qS4goWBT7poplM69zy_3xhKwEW
> 14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=-2rr
> vnxOquKSuy0j8mA2pAlrOSOTTCmQfJZda96Q_v8&s=0wFElBI6WRQmVZQUWAVuCxyYsR0U
> ctxpvVa617s_0qk&e=
> drugner-pipeline-and-identifying-dates#post14
>
> Some sample input text that I have tested on -
>
> 1) ASAT 10mg Tablet(Atorvastatin): Take 1 Tablet Four times daily, 
> after meals and at bedtime for 5 days.
>
> 2) The patient started study treatment of Thalomid 200mg (days 1-21), 
> and Epirubicin, 20 mg /m2 (days 1, 8, and 15) on 06/07/02 for the 
> treatment of hepatocellular carcinoma.
>
> 3) ASAT 10mg Four times daily
>
> 4) paracetamol BID AC 10d PO, aspirin BD
>
>
> Regards
> Chahal Arora
> Software Engineer
> Raxa
>