This Python script analyzes the sentiment of the text (review) using spaCy for tokenization and VADER (Valence Aware Dictionary and sEntiment Reasoner) for sentiment analysis. It calculates sentiment scores and categorizes them as positive, negative, or neutral based on a threshold.
spacy
: Python library for natural language processing.vaderSentiment
: Python library for sentiment analysis.pyspellchecker
: Python library for correcting incorrect spellings
pip install spacy vaderSentiment pyspellchecker
python -m spacy download en_core_web_sm
git clone https://github.com/Niall1985/Sentiment-Analysis.git
cd your_repository-folder
code .
python Sentiment_analyzer.py
Enter the review to be analyzed here: This is a great product! I love it.
Sentiment Score: {'neg': 0.0, 'neu': 0.435, 'pos': 0.565, 'compound': 0.6249}
Positive sentiment 😁
- Adjust the threshold (0.3 and -0.3) in the script to modify how sentiment is categorized as positive, negative, or neutral.
- Ensure proper input format for accurate sentiment analysis results.
This project is licensed under the MIT License - see the LICENSE file for details.