Upload dictutils.py
Browse files- dictutils.py +33 -0
dictutils.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
# reading the nct_ta dictionary
|
| 5 |
+
with open('asset/data/nct_ta_dict.json') as f:
|
| 6 |
+
data = f.read()
|
| 7 |
+
nct_ta_dict = json.loads(data) #load dict
|
| 8 |
+
# print(len(nct_ta_dict))
|
| 9 |
+
|
| 10 |
+
# reading the mesh_to_ta_dict dictionary
|
| 11 |
+
with open('asset/data/mesh_to_ta_dict.json') as f:
|
| 12 |
+
data = f.read()
|
| 13 |
+
mesh_to_ta_dict = json.loads(data) #load dict
|
| 14 |
+
# print(len(mesh_to_ta_dict))
|
| 15 |
+
with open('asset/data/replacement_dict.json') as f:
|
| 16 |
+
data = f.read()
|
| 17 |
+
repl_dict = json.loads(data) #load dict
|
| 18 |
+
# print(len(mesh_to_ta_dict))
|
| 19 |
+
|
| 20 |
+
with open('asset/data/entry_terms_dict.json') as f:
|
| 21 |
+
data = f.read()
|
| 22 |
+
entry_dict = json.loads(data) #load dict
|
| 23 |
+
# print(len(mesh_to_ta_dict))
|
| 24 |
+
|
| 25 |
+
with open('asset/data/final_check_dict.json') as f:
|
| 26 |
+
data = f.read()
|
| 27 |
+
final_check = json.loads(data) #load dict
|
| 28 |
+
# print(len(mesh_to_ta_dict))
|
| 29 |
+
|
| 30 |
+
with open('asset/data/gb_us_dict.json') as f:
|
| 31 |
+
data = f.read()
|
| 32 |
+
gb_2_us_dict = json.loads(data) #load dict
|
| 33 |
+
# print(len(mesh_to_ta_dict))
|