A text-classification pipeline that uses TF-IDF features and a Multinomial Naïve Bayes classifier to predict the language of input sentences.
TfidfVectorizer
, fits a MultinomialNB
model, and evaluates performance via accuracy score, confusion matrix, and classification report .