From 97c45187050346bcddafd71637b7712158170b60 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 26 Jan 2015 04:55:41 +1100 Subject: [PATCH] * Fix code in examples. --- docs/source/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 18ce24ee8..7d87eafc1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -184,7 +184,7 @@ adverbs to. Recall that our previous adverb highlighting function looked like this: >>> import spacy.en - >>> from spacy.postags import ADVERB + >>> from spacy.parts_of_speech import ADV >>> # Load the pipeline, and call it with some text. >>> nlp = spacy.en.English() >>> tokens = nlp("‘Give it back,’ he pleaded abjectly, ‘it’s mine.’", @@ -206,7 +206,7 @@ problematic, given our starting assumptions: >>> from numpy import dot >>> from numpy.linalg import norm >>> import spacy.en - >>> from spacy.postags import ADVERB, VERB + >>> from spacy.parts_of_speech import ADV, VERB >>> cosine = lambda v1, v2: dot(v1, v2) / (norm(v1), norm(v2)) >>> def is_bad_adverb(token, target_verb, tol): ... if token.pos != ADVERB