From 36517516ef093bea4b517fda5c87790ea377b4c9 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 3 Nov 2015 03:21:26 +1100 Subject: [PATCH] * Replace deprecated repvec reference in twitter-filter --- website/src/jade/tutorials/twitter-filter/index.jade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/src/jade/tutorials/twitter-filter/index.jade b/website/src/jade/tutorials/twitter-filter/index.jade index c322612e4..2a6f19823 100644 --- a/website/src/jade/tutorials/twitter-filter/index.jade +++ b/website/src/jade/tutorials/twitter-filter/index.jade @@ -80,10 +80,10 @@ include ./meta.jade | | def match_tweet(spacy, text, query): | def get_vector(word): - | return spacy.vocab[word].repvec + | return spacy.vocab[word].vector | | tweet = spacy(text) - | tweet = [w.repvec for w in tweet if w.is_alpha and w.lower_ != query] + | tweet = [w.vector for w in tweet if w.is_alpha and w.lower_ != query] | if tweet: | accept = map(get_vector, 'Jeb Cheney Republican 9/11h'.split()) | reject = map(get_vector, 'garden Reggie hairy'.split()) @@ -147,11 +147,11 @@ include ./meta.jade pre.language-python: code | def handle_tweet(spacy, resp, query): | def get_vector(word): - | return spacy.vocab[word].repvec + | return spacy.vocab[word].vector | | text = resp.get('text', '').decode('utf8') | tweet = spacy(text) - | tweet = [w.repvec for w in tweet if w.is_alpha and w.lower_ != query] + | tweet = [w.vector for w in tweet if w.is_alpha and w.lower_ != query] | if tweet: | accept = map(get_vector, 'Jeb Cheney Republican 9/11h'.split()) | reject = map(get_vector, 'garden Reggie hairy'.split())