From 274b8028303b5da8934d438de805c473c16fb819 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 11 Feb 2015 20:07:39 -0500 Subject: [PATCH] * Fix docs bug --- docs/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 54618b19a..dae0d206a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -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]))