From df389e5b747fb469452e9dee4e67bc7c5835bd6c Mon Sep 17 00:00:00 2001 From: Pradeep Kumar Tippa Date: Thu, 19 Apr 2018 03:24:26 +0530 Subject: [PATCH] spacy-101 vocab doc giving valid variable names (#2236) --- website/usage/_spacy-101/_vocab.jade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/usage/_spacy-101/_vocab.jade b/website/usage/_spacy-101/_vocab.jade index b81e0f33c..d920ae64f 100644 --- a/website/usage/_spacy-101/_vocab.jade +++ b/website/usage/_spacy-101/_vocab.jade @@ -96,13 +96,13 @@ p assert doc.vocab.strings[3197928453018144401] == u'coffee' # 👍 empty_doc = Doc(Vocab()) # new Doc with empty Vocab - # doc.vocab.strings[3197928453018144401] will raise an error :( + # empty_doc.vocab.strings[3197928453018144401] will raise an error :( empty_doc.vocab.strings.add(u'coffee') # add "coffee" and generate hash - assert doc.vocab.strings[3197928453018144401] == u'coffee' # 👍 + assert empty_doc.vocab.strings[3197928453018144401] == u'coffee' # 👍 new_doc = Doc(doc.vocab) # create new doc with first doc's vocab - assert doc.vocab.strings[3197928453018144401] == u'coffee' # 👍 + assert new_doc.vocab.strings[3197928453018144401] == u'coffee' # 👍 p | If the vocabulary doesn't contain a string for #[code 3197928453018144401],