This project is a simple but effective sentiment analysis tool built using Python and the Natural Language Toolkit (NLTK). It's trained on a dataset of movie reviews to classify a piece of text as either "Positive" or "Negative".
The script performs the following steps:
movie_reviews corpus included with NLTK.1. Navigate to the project directory:
cd NLTK-Sentiment-Analyzer
2. Install dependencies:
pip install -r requirements.txt
3. Run the script:
python sentiment_analyzer.py
The first time you run the script, it will automatically download the necessary NLTK data packages.
Accuracy: 85.0%
---
Sentence: "This movie was absolutely fantastic! The acting was superb."
Sentiment: Positive
---
Sentence: "I did not like the film. It was boring and slow."
Sentiment: Negative