This project implements sentiment analysis in natural language processing (NLP) using machine learning techniques. The goal is to classify movie reviews as positive or negative based on the sentiment expressed in the text.
- Preprocesses raw text data to remove noise and standardize the format.
- Extracts features from text data using Bag-of-Words (BoW) representation.
- Trains a sentiment analysis model using Multinomial Naive Bayes classifier.
- Evaluates the model's performance using accuracy as the evaluation metric.
The IMDb Movie Reviews dataset is used for training and testing the sentiment analysis model. The dataset consists of positive and negative movie reviews.
-
Data Preprocessing:
- Ensure that the IMDb Movie Reviews dataset is downloaded and stored in the
datadirectory. - Preprocess the raw text data to clean and standardize it before feature extraction.
- Ensure that the IMDb Movie Reviews dataset is downloaded and stored in the
-
Feature Extraction:
- Run the
feature_extraction.pyscript to convert text data into numerical feature vectors using Bag-of-Words representation.
- Run the
-
Model Building:
- Run the
model_building.pyscript to train the sentiment analysis model using the preprocessed data and evaluate its performance.
- Run the
-
Interpret Results:
- Analyze the accuracy of the model and review any misclassifications to iteratively improve the model's performance.
- Python 3.x
- scikit-learn
- Other dependencies (if any)
- Clone the repository:
git clone https://github.com/sestok/IMDB-Sentiment-Analysis-NLP/ - Download the Dataset from here https://ai.stanford.edu/~amaas/data/sentiment/
- Navigate to the project directory:
cd Sentiment-Analysis-in-NLP - Follow the instructions provided above to preprocess the data, extract features, and build the sentiment analysis model.