mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 01:04:34 +03:00
* Add prepare_vecs script
This commit is contained in:
parent
fbf19049cf
commit
bb27979352
15
bin/prepare_vecs.py
Normal file
15
bin/prepare_vecs.py
Normal file
|
@ -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)
|
Loading…
Reference in New Issue
Block a user