Sentiment Analysis API🎭
Analyze the sentiment of any text input with a simple API request. The Sentiment Analysis API processes text and determines its sentiment—positive, negative, or neutral—using natural language processing (NLP). It utilizes the NLTK (Natural Language Toolkit) SentimentIntensityAnalyzer, a lightweight, lexicon-based sentiment analysis model. This model was chosen specifically because it is efficient and small in size, making it ideal for deployment on AWS Lambda. While the analysis is not 100% accurate and does not capture complex nuances in language, this API serves as a proof of concept to demonstrate how sentiment analysis can be integrated into applications.
Live Demo ▶️
- Input some text in the box and click "Analyze".
- The background color will change based on sentiment:
- 🟢 Green → Positive
- 🔴 Red → Negative
- ⚪ Neutral → Neutral
Try different phrases and see the results instantly! 🚀
Features 🚀
- ✅ Real-Time Sentiment Analysis – Quickly analyze the sentiment of any text input.
- ✅ Lightweight & Fast – Uses NLTK’s SentimentIntensityAnalyzer, optimized for serverless environments like AWS Lambda.
- ✅ Simple JSON Responses – Get a straightforward sentiment label (POSITIVE, NEGATIVE, or NEUTRAL) along with a confidence score.
- ✅ CORS Support – Easily integrate with frontend applications and external services.
- ✅ Well-Documented API – OpenAPI/Swagger documentation for quick reference.