* Fix docs bug

This commit is contained in:
Matthew Honnibal 2015-02-11 20:07:39 -05:00
parent 773d209405
commit 274b802830
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ cosine metric:
>>> from numpy.linalg import norm
>>> cosine = lambda v1, v2: dot(v1, v2) / (norm(v1) * norm(v2))
>>> words = [w for w in nlp.vocab if w.lower]
>>> words = [w for w in nlp.vocab if w.has_repvec]
>>> words.sort(key=lambda w: cosine(w.repvec, pleaded.repvec))
>>> words.reverse()
>>> print('1-20', ', '.join(w.orth_ for w in words[0:20]))