This project performs sentiment analysis on tweets using the NLTK library. It classifies tweets as either Positive or Negative using a Naive Bayes classifier trained on NLTK's built-in Twitter dataset.
- Uses NLTK's twitter_samples corpus for training.
- Preprocessing includes tokenization, lemmatization, and noise removal.
- Implements Naive Bayes Classifier for sentiment classification.
- Accepts custom tweets for sentiment prediction.
Ensure you have Python installed (recommended: Python 3.7+). Install the necessary dependencies using:
pip install nltk
git clone https://github.com/your-username/Sentiment-Analysis-NLTK.git cd Sentiment-Analysis-NLTK
python src/sentiment_analysis.py
The script prompts for a tweet input and predicts whether it's positive or negative.
Enter a tweet: I love this! Prediction: Positive
- NLTK - Natural Language Toolkit for text processing
- Python 3.x - Required for running the script
This project is licensed under the MIT License.
Feel free to fork the repository and submit pull requests with improvements!