dbeanm / DrugPipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DrugPipeline

Modified from https://github.com/CogStack/OAC-NLP

data/ace2_drugs.csv is the list of drugs used for our preprint Treatment with ACE-inhibitors is associated with less severe disease with SARS-Covid-19 infection in a multi-site UK acute Hospital Trust

work in progress

annr = DrugMentionNLP.DrugAnnotator(["drug1", "drug2"])
result = annr.annotate("my document text with drug 1")

.annotate returns each mention of each drug tagged for negation and with the surrounding context

Usage

DrugMentionNLP.py contains the OACAnnotator class which does all the work, the only method used externally is .annotate()

Demo usage in demo.py which also uses utils.py to format the output of the annotator to a convenient pandas dataframe. The demo script also demonstrates using a csv of drug brand/generic names to easily filter and group drugs for analysis.

Currently basic negation and allergy detection is enabled by default.

Funding

Dan Bean is funded by Health Data Research UK

Contact

Developed by Dan Bean at King's College London - daniel.bean@kcl.ac.uk

About

License:GNU General Public License v3.0


Languages

Language:Python 100.0%