Skip to content

Commit

Permalink
add nltk stopwords and punkt downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
Dechrissen committed Dec 19, 2020
1 parent b87f8b8 commit 4952c2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions recommender.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from sklearn.metrics.pairwise import linear_kernel
import numpy as np
from statistics import mean
import nltk


def recommend(title, cosine_sim, indices, df):
Expand Down Expand Up @@ -88,6 +89,8 @@ def check_new(check):
#####################################
######## Program begins here ########
#####################################
nltk.download('stopwords')
nltk.download('punkt')
np.set_printoptions(formatter={'float': lambda x: "{0:0.8f}".format(x)})

print('Building user model ...')
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
numpy==1.19.2
rake_nltk==1.0.4
pandas==1.1.4
requests==2.24.0
rake_nltk==1.0.4
numpy==1.19.2
nltk==3.5
beautifulsoup4==4.9.3
scikit_learn==0.23.2

0 comments on commit 4952c2f

Please sign in to comment.