Medication Name, Dosage, Frequency Entity Extraction

We are working on a health care platform and need to create bot which can detect Medication Name, Dosage and Frequency. Few Sample examples are

**Dr Susan told my mom to start taking aciphex​ ​twice a day in the morning

Add medicine ​prilosec​ dosage ​2 pills

We created few training data and rasa nlu is able to detect the intent and member entity. It is not able to detect properly the medication name, frequency or dosage.

Can someone help how to approach this use case.

Hello,

You will need to have a lot of training data for your bot to detect the medication name since it is a custom entity. The same goes for the frequency and dosage.

One way you can do this (if you don’t want to have 100s of examples in nlu) is to train your Spacy model with new entities like medication, dosage etc. Even there you’ll need huge amounts of data but once you train that, you can use it here to identify your entities. You can refer these docs: Custom entity using Spacy

You can also check the regex identifier.

Hi Srikar,

Thanks for quick reply

Is it good approach to use lookup tables for medication name, regex for dosage and synonyms for frequency detection?

hey @abhicoo you can use lookup tables but it wont be machine-learned, i mean it works as case insensitive regex pattern matching.

Yea, since you’ll have huge amount of data, a lookup table would be fine. You won’t have to train much that way.

hey @abhicoo before procceeding with lookup tables make sure you read this blog,

,