Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,6 +44,8 @@ def preprocess_for_word2vec(text):
|
|
44 |
text = [ps.stem(t) for t in text if t not in stopwords.words('english')]
|
45 |
corpus.append(text)
|
46 |
|
|
|
|
|
47 |
def average_word_vectors(words, model, vocabulary, num_features):
|
48 |
feature_vector = np.zeros((num_features,), dtype="float64")
|
49 |
nwords = 0.
|
|
|
44 |
text = [ps.stem(t) for t in text if t not in stopwords.words('english')]
|
45 |
corpus.append(text)
|
46 |
|
47 |
+
return corpus
|
48 |
+
|
49 |
def average_word_vectors(words, model, vocabulary, num_features):
|
50 |
feature_vector = np.zeros((num_features,), dtype="float64")
|
51 |
nwords = 0.
|