Update gen_vocab.py
Browse files- gen_vocab.py +1 -1
gen_vocab.py
CHANGED
|
@@ -14,7 +14,7 @@ if __name__=='__main__':
|
|
| 14 |
with codecs.open(p, encoding='utf-8') as f:
|
| 15 |
txt = f.read().strip()
|
| 16 |
vocab.update(txt)
|
| 17 |
-
root_path = os.path.split(args.cust_vocab)
|
| 18 |
os.makedirs(root_path, exist_ok=True)
|
| 19 |
with open(args.cust_vocab, 'w') as f:
|
| 20 |
f.write('\n'.join(list(vocab)))
|
|
|
|
| 14 |
with codecs.open(p, encoding='utf-8') as f:
|
| 15 |
txt = f.read().strip()
|
| 16 |
vocab.update(txt)
|
| 17 |
+
root_path = os.path.split(args.cust_vocab)[0]
|
| 18 |
os.makedirs(root_path, exist_ok=True)
|
| 19 |
with open(args.cust_vocab, 'w') as f:
|
| 20 |
f.write('\n'.join(list(vocab)))
|