This repository was archived by the owner on Oct 11, 2023. It is now read-only.

Description
Does there some code issue in the chapter1? such as Example 1-1. The following code in
the example 1-1, xticklabels = vocab, I can't find the vocab was stated in the previous text.
and if run this code, can't show any image. It likes the code loss import the matplotlib and should add the code plt.show().
from sklearn.feature_extraction.text
import CountVectorizer import seaborn as sns
corpus = ['Time flies flies like an arrow.', 'Fruit flies like a banana.']
one_hot_vectorizer = CountVectorizer(binary=True)
one_hot = one_hot_vectorizer.fit_transform(corpus).toarray()
sns.heatmap(one_hot, annot=True, cbar=False, xticklabels=vocab, yticklabels=['Sentence 2'])