Spaces:
Sleeping
Sleeping
DWizard
commited on
Commit
•
582d6c9
1
Parent(s):
7def859
small fix of dict_util
Browse filesFormer-commit-id: 694e18805430fc42fa536577daa7a1ab0c77eac0
- dict_util.py +2 -0
dict_util.py
CHANGED
@@ -22,12 +22,14 @@ def export_dict_csv(term_dict, f):
|
|
22 |
|
23 |
def save_dict_pickle(term_dict, f):
|
24 |
pickle.dump(term_dict, f, pickle.HIGHEST_PROTOCOL)
|
|
|
25 |
|
26 |
def update_csv_pickle(pickle_f, csv_f):
|
27 |
term_dict = pickle.load(pickle_f)
|
28 |
update_dict_csv(term_dict, csv_f)
|
29 |
#save to pickle file, highest protocal to get better performance
|
30 |
pickle.dump(term_dict, pickle_f, pickle.HIGHEST_PROTOCOL)
|
|
|
31 |
|
32 |
|
33 |
#demo
|
|
|
22 |
|
23 |
def save_dict_pickle(term_dict, f):
|
24 |
pickle.dump(term_dict, f, pickle.HIGHEST_PROTOCOL)
|
25 |
+
pass
|
26 |
|
27 |
def update_csv_pickle(pickle_f, csv_f):
|
28 |
term_dict = pickle.load(pickle_f)
|
29 |
update_dict_csv(term_dict, csv_f)
|
30 |
#save to pickle file, highest protocal to get better performance
|
31 |
pickle.dump(term_dict, pickle_f, pickle.HIGHEST_PROTOCOL)
|
32 |
+
pass
|
33 |
|
34 |
|
35 |
#demo
|