Skip to content

Commit 501793e

Browse files
authored
added function to create embeddings
1 parent 87f53fc commit 501793e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

embedding.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,11 @@ def create(glove_path):
4141
with open(word_idx_path,'w') as f:
4242
pickle.dump(word_idx,f)
4343

44+
def main():
45+
parser = argparse.ArgumentParser()
46+
parser.add_argument('-address', type=str, required=True)
47+
args = parser.parse_args()
48+
print('Preparing embeddings ...')
49+
create(args.address)
50+
51+
if __name__ == '__main__': main()

0 commit comments

Comments
 (0)