From bb279793524bd1c20a8dd0a6871e6dc5e4aa4944 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 2 Apr 2015 06:19:39 +0200 Subject: [PATCH] * Add prepare_vecs script --- bin/prepare_vecs.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 bin/prepare_vecs.py diff --git a/bin/prepare_vecs.py b/bin/prepare_vecs.py new file mode 100644 index 000000000..a8c774052 --- /dev/null +++ b/bin/prepare_vecs.py @@ -0,0 +1,15 @@ +"""Read a vector file, and prepare it as binary data, for easy consumption""" + +import bz2 +import plac +import struct + +from spacy.vocab import write_binary_vectors + + +def main(in_loc, out_loc): + write_binary_vectors(in_loc, out_loc) + + +if __name__ == '__main__': + plac.call(main)