mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 17:24:41 +03:00
Update word-vectors-similarities.jade
add ``` import spacy nlp = spacy.load('en') ```
This commit is contained in:
parent
ea2732469b
commit
425c09488d
|
@ -21,10 +21,12 @@ p
|
|||
|
||||
+code.
|
||||
import numpy
|
||||
import spacy
|
||||
nlp = spacy.load('en')
|
||||
|
||||
apples, and_, oranges = nlp(u'apples and oranges')
|
||||
print(apples.vector.shape)
|
||||
# (1,)
|
||||
# (300,)
|
||||
apples.similarity(oranges)
|
||||
|
||||
p
|
||||
|
|
Loading…
Reference in New Issue
Block a user