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.
Metadata
Release files for med-terms 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| med-terms-0.0.1.tar.gz | 6.7 MB | Details |
Release files / med-terms-0.0.1.tar.gz
| Download URL | med-terms-0.0.1.tar.gz |
|---|---|
| Size | 6.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8140960871fe2a65ef636a770ab5c3ecfa0583f40ab71ad0334ed58b610ccdbc
|
|
BLAKE2b-256 checksum How to use checksums |
f00d9b063102939a03bad09f95da5b2ba8e74b1438d5a6b34cc208adcb28127a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|