<jupyter_start><jupyter_text>Now use the pipeline<jupyter_code># fitting naive bayes to the training set 
from sklearn.naive_bayes import GaussianNB , MultinomialNB
from sklearn.metrics import confusion_matrix 
vectorizer = TfidfVectorizer(tokenizer = change_into_tokens)
classifier = MultinomialNB()
#use the pipeline now 

clf = Pipeline([('vect', vectorizer ), ('clf', classifier)])
clf.fit(X_train , y_train)
y_pred = clf.predict(X_test)
cm = confusion_matrix(y_test , y_pred)
cm
from sklearn.metrics import classification_report , accuracy_score
print(classification_report(y_test , y_pred))
print(accuracy_score(y_test ,y_pred))<jupyter_output>0.0
{'fraction_non_alphanumeric': 0.09341500765696784, 'fraction_numerical': 0.0030627871362940277, 'mean_word_length': 7.958904109589041, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '523745', 'license': 'MIT', 'n_tokens_mistral': 235, 'n_tokens_neox': 224, 'n_words': 51, 'path': 'chapter-1/naive_bayes.ipynb', 'repo_name': 'xettrisomeman/speechandtext', 'size': '653'}