Commit 645c78ec by Achyudh Ram

Add word2vec bin2txt.py

parent a4cb59d9
from argparse import ArgumentParser
from gensim.models.keyedvectors import KeyedVectors
import torch
from tqdm import tqdm
if __name__ == '__main__':
parser = ArgumentParser(description='Convert binary word2vec to txt')
parser.add_argument('input')
parser.add_argument('output')
args = parser.parse_args()
model = KeyedVectors.load_word2vec_format(args.input, binary=True)
model.save_word2vec_format(args.output, binary=False)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment