19ae606b4608957335ce16b8bd2a9bd2ecd7e098,tutorial/load_dictionaries.py,,load_acronym_dictionary,#,57
Before Change
doid = {word:1 for word in doid if word.isupper()}
diseases.update(doid)
dictfile = "data/dicts/ncbi_training_diseases.txt"
terms = [line .strip().split("\t")[0] for line in open(dictfile).readlines() ]
terms = {word:1 for word in terms if word.isupper()}
diseases.update(terms)
// filter by char length
diseases = {word:1 for word in diseases if len(word) > 1}
After Change
Load a dictionary of disease phrases **as a list**.
NOTE: Eventually we"ll want to pass along IDs
a = set()
// UMLS disorders
dictfile = "data/dicts/umls_disorders_v2.bz2"
diseases = [line.strip().split("\t")[0] for line in bz2.BZ2File(dictfile, "rb").readlines()]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances Project Name: snorkel-team/snorkel
Commit Name: 19ae606b4608957335ce16b8bd2a9bd2ecd7e098
Time: 2016-07-01
Author: ajratner@gmail.com
File Name: tutorial/load_dictionaries.py
Class Name:
Method Name: load_acronym_dictionary
Project Name: codelucas/newspaper
Commit Name: 6327d66fc29e242a8a47018d333c12b4b4bcfaf9
Time: 2017-10-21
Author: obulat@gmail.com
File Name: newspaper/nlp.py
Class Name:
Method Name:
Project Name: PyThaiNLP/lexicon-thai
Commit Name: b731f24a9f6a2f5547ebd6e642004adeacbe18da
Time: 2017-08-16
Author: wannaphong@yahoo.com
File Name: ข้อความ/build_pythainlp.py
Class Name:
Method Name: