Complete the code to import the necessary library for text vectorization.
from sklearn.feature_extraction.text import [1]
The TfidfVectorizer converts text data into numerical features using TF-IDF scores, which is common in text classification.
Complete the code to split data into training and testing sets.
from sklearn.model_selection import [1] X_train, X_test, y_train, y_test = [1](X, y, test_size=0.2, random_state=42)
train_test_split is used to split data into training and testing sets for model evaluation.
Fix the error in the model training code by filling the blank with the correct classifier.
from sklearn.linear_model import [1] model = [1]() model.fit(X_train, y_train)
LogisticRegression is suitable for classification tasks, including multi-class classification.
Fill both blanks to create a dictionary of word counts for words longer than 3 characters.
word_counts = {word: [1] for word in text.split() if len(word) [2] 3}The dictionary comprehension counts occurrences of words longer than 3 characters.
Fill all three blanks to create a dictionary of words and their counts for words longer than 4 characters.
filtered_counts = [1]{word: [2] for word in words if len(word) [3] 4}
The code builds a dictionary from a comprehension, counting words longer than 4 characters.