ddiddu commited on
Commit
9191e97
1 Parent(s): 9b08db0

add ngrams

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -120,7 +120,7 @@ def get_recommendations_TFIDF(abstract):
120
  corpus = pd.concat([train_corpus, pd.Series(abstract)], ignore_index=True)
121
 
122
  # Initialize an instance of tf-idf Vectorizer
123
- tfidf_vectorizer = TfidfVectorizer()
124
  # Generate the tf-idf vectors for the corpus
125
  tfidf_matrix = tfidf_vectorizer.fit_transform(corpus)
126
 
 
120
  corpus = pd.concat([train_corpus, pd.Series(abstract)], ignore_index=True)
121
 
122
  # Initialize an instance of tf-idf Vectorizer
123
+ tfidf_vectorizer = TfidfVectorizer(ngram_range=(1, 2))
124
  # Generate the tf-idf vectors for the corpus
125
  tfidf_matrix = tfidf_vectorizer.fit_transform(corpus)
126