Skip to content

Commit edfb2a1

Browse files
committed
Create _deserialize.py
1 parent 7847bd8 commit edfb2a1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bin/_deserialize.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'''Load a spaCy model
2+
3+
1. Download and extract https://index.spacy.io/models/en_default-1.0.8/archive.gz
4+
2. Find the model file deps/model
5+
3. Pass the path to this file to this script
6+
'''
7+
import sys
8+
9+
10+
def main(loc):
11+
model = thinc.linear.avgtron.AveragedPerceptron([])
12+
model.load(loc)
13+
14+
15+
if __name__ == '__main__':
16+
main(sys.argv[1])

0 commit comments

Comments
 (0)