From 0fbab8160d280e2df4d30836b4f91edd7febef32 Mon Sep 17 00:00:00 2001 From: ines Date: Wed, 1 Nov 2017 13:14:43 +0100 Subject: [PATCH] Update GloVe vectors example --- website/usage/_vectors-similarity/_custom.jade | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/website/usage/_vectors-similarity/_custom.jade b/website/usage/_vectors-similarity/_custom.jade index 7792949d1..a6a28058f 100644 --- a/website/usage/_vectors-similarity/_custom.jade +++ b/website/usage/_vectors-similarity/_custom.jade @@ -161,10 +161,16 @@ p +cell float64 (double) +code. - from spacy.vectors import Vectors + nlp = spacy.load('en') + nlp.vocab.vectors.from_glove('/path/to/vectors') - vectors = Vectors([], 128) - vectors.from_glove('/path/to/vectors') +p + | If your instance of #[code Language] already contains vectors, they will + | be overwritten. To create your own GloVe vectors model package like + | spaCy's #[+a("/models/en#en_vectors_web_lg") #[code en_vectors_web_lg]], + | you can call #[+api("language#to_disk") #[code nlp.to_disk]], and then + | package the model using the #[+api("cli#package") #[code package]] + | command. +h(3, "custom-loading-other") Loading other vectors +tag-new(2)