Med-Terms
Medical Term Dictionary built from MedDRA
Installation
pip install med-terms
Let Codes Speak
Example 1: Build term dicionaries from MedDRA data in English and Chinese versions, and creating term mapping file.
import pickle
from medterms.MedDRA import *
if __name__=="__main__":
# create the dictionary from the MedDRA knowledge base including Chinese and English versions
meddra_en_root="input/MedDRA_24.0_English_0"
meddra_cn_root="input/MedDRA_24_0_Chinese"
build_en_dict_from_MedDRA(meddra_en_root, save_path="output/en_dict.pickle")
build_cn_dict_from_MedDRA(meddra_cn_root, save_path="output/cn_dict.pickle")
# Mapping from english terms to chinese terms according to MedDRA dictionaries
en_to_cn(src_en_path='input/covid19_en_terms.pickle', # input
en_dict_path='output/en_dict.pickle', cn_dict_path='output/cn_dict.pickle', # input
target_cn_path='output/covid19_cn_terms.pickle', target_en2cn_path='output/covid19_en2cn_terms.pickle') # output
# check data files (pickle format)
print(pickle.load(open('input/covid19_en_terms.pickle', 'rb')))
print(pickle.load(open('output/covid19_cn_terms.pickle', 'rb')))
print(pickle.load(open('output/covid19_en2cn_terms.pickle', 'rb')))
Example 2: Show word cloud from the entire dictionary or part of the dictionary.
from medterms.wordcloud import *
if __name__=="__main__":
src_file= "input/covid19_symptoms.pickle"
mapping_file= "output/covid19_en2cn_terms.pickle" # Mapping from english to chinese
# show_word_cloud_with_mapping(src_file,mapping_file)
show_word_cloud(src_file)
License
The med-terms project is provided by Donghua Chen.
NOTE: This project does not include MedDRA data due to license issue.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
med-terms-0.0.1.tar.gz
(6.7 MB
view details)
File details
Details for the file med-terms-0.0.1.tar.gz.
File metadata
- Download URL: med-terms-0.0.1.tar.gz
- Upload date:
- Size: 6.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8140960871fe2a65ef636a770ab5c3ecfa0583f40ab71ad0334ed58b610ccdbc
|
|
| MD5 |
8ea20fb9292be92532efc2b5a4fcbc7f
|
|
| BLAKE2b-256 |
f00d9b063102939a03bad09f95da5b2ba8e74b1438d5a6b34cc208adcb28127a
|