This project is a sentiment analysis model that can classify text as positive or negative. The model is trained on a dataset of movie reviews and can be used to classify the sentiment of any text.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python 3.6 or higher
- scikit-learn
- pandas
- numpy
- pickle
Clone the repository and install the dependencies using pip:
git clone https://github.com/Sultan-aj/Sentiment-Analysis.git
pip install -r requirements.txt
To use the model, you can use the provided predict.py
script to classify the sentiment of a single text.
- Open the
predict.py
script in your text editor. - Locate the following line:
with open("insert_your_file_path_here", "r") as f:
- Replace
'insert_your_file_path_here'
with the path to your text file.
with open("path/to/text_file.txt", "r") as f:
- Save the changes to the
predict.py
script. - Run the script by typing the following command in your terminal:
python predict.py
- Scikit-learn - The machine learning library used
- Pandas - Data manipulation and analysis
- Numpy - Scientific computing with Python
- Pickle - Serialization of the trained model
- Sultan.aj - https://github.com/Sultan-aj
This project is licensed under the MIT License - see the LICENSE.md file for details.