Sentiment classification is a crucial task in natural language processing that aims to automatically identify the sentiment class that is expressed in text documents. This project focuses on utilizing machine learning techniques to perform sentiment classification and explores the effectiveness of various algorithms in accurately predicting sentiment. The project contains a dataset of labeled texts encompassing sadness, love, joy, surprise, fear, and anger sentiments to train and evaluate several machine-learning models. These models include traditional classifiers such as Support Vector Machines (SVM), Logistic Regression, Naive Bayes, Bernoulli Naive Bayes, Random Forest, K-Nearest Neighbors, and Decision Tree. The project also investigates the impact of different feature representations, such as Bag-of-words, TF-IDF, and Word2Vec, on classification performance. The experimental results demonstrate the efficacy of machine learning algorithms in sentiment classification tasks, with certain models outperforming others in terms of accuracy, precision, recall, and f1-score. The findings of this project contribute to the broader field of sentiment analysis and provide valuable information for developing sentiment classification systems in real-world applications.
pip install pandas, numpy, matplotlib, seaborn
pip install -U scikit-learn
pip install neattext