This is a sentiment analysis project built using Python and machine learning.
The following Python libraries are required to run the code:
- pandas (
import pandas as pd
): Data manipulation and analysis. - numpy (
import numpy as np
): Numerical operations and array manipulation. - nltk (
import nltk
): Natural Language Toolkit for text processing. - re (
import re
): Regular expressions for string manipulation. - string (
import string
): String manipulation operations. - stopwords (
from nltk.corpus import stopwords
): Stopwords for text cleaning. - PorterStemmer (
from nltk.stem.porter import PorterStemmer
): Stemming algorithm for word normalization. - CountVectorizer (
from sklearn.feature_extraction.text import CountVectorizer
): Feature extraction for text data. - LogisticRegression (
from sklearn.linear_model import LogisticRegression
): Logistic regression model for classification. - f1_score, accuracy_score (
from sklearn.metrics import f1_score, accuracy_score
): Evaluation metrics for classification models. - WordCloud (
from wordcloud import WordCloud
): Visualization of word frequencies. - matplotlib.pyplot (
import matplotlib.pyplot as plt
): Data visualization library. - seaborn (
import seaborn as sns
): Data visualization library built on top of matplotlib. - warnings (
import warnings
): Handling warnings in the code.