mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Merge pull request #1350 from hscspring/patch-3
Update word-vectors-similarities.jade
This commit is contained in:
commit
1dbc2285b8
|
@ -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