Skip to content

Commit

Permalink
Merge pull request #33 from KrishanBhasin/tf-idf-example-typo
Browse files Browse the repository at this point in the history
Fix a tiny typo in TF-IDF example
  • Loading branch information
veekaybee committed Oct 4, 2023
2 parents f78dd52 + 2a41115 commit 169e977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion embeddings.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ \subsubsection{TF-IDF}

vectorizer = TfidfVectorizer()
vector = vectorizer.fit_transform(corpus)
dict(zip(vectorizer.get_feature_names_out(), X.toarray()[0]))
dict(zip(vectorizer.get_feature_names_out(), vector.toarray()[0]))

tfidf_df = pd.DataFrame(vector.toarray(), index=text_titles, columns=vectorizer.get_feature_names_out())

Expand Down

0 comments on commit 169e977

Please sign in to comment.