from sklearn.feature_extraction.text import TfidfVectorizer

responses = ["very satisfied with the service", "not satisfied at all", "service was fine"]
vectorizer = TfidfVectorizer(stop_words="english")
X = vectorizer.fit_transform(responses)
>>> X.shape       # (n_responses, n_unique_words)
(3, 5)
