A powerful web application that analyzes text sentiment in real-time, providing deep insights into emotional tone, polarity, and emotional characteristics. Built with modern web technologies for accurate and instant sentiment detection.
Access the live application at: https://sentimentv1.netlify.app/
- Instant Sentiment Detection: Get immediate feedback as you type.
- Live Polarity Scoring: Dynamic positive/negative/neutral scoring.
- Continuous Emotion Tracking: Real-time emotion detection updates.
- Detailed Polarity Breakdown: Percentage-based sentiment scoring.
- Emotion Classification: Identify specific emotions (joy, anger, sadness, etc.)
- Visual Analytics: Interactive charts and graphs for data visualization.
- Analysis History: Automatic logging of previous sentiment analyses.
- Session Persistence: Maintain your analysis history across sessions.
- Export Capabilities: Save or export results for further analysis.
- Responsive Design: Optimized for desktop, tablet, and mobile devices.
- Intuitive Interface: Clean, modern, and user-friendly design.
- Accessibility Focused: Built with accessibility best practices.
- β‘ JavaScript (ES6+) - Core programming language.
- π¨ HTML5 & CSS3 - Modern web standards and styling.
- βοΈ React - Component-based UI library.
- π¨ Tailwind CSS - Utility-first CSS framework.
- π§ Gemini API - Advanced Natural Language Processing.
- βοΈ Netlify - Cloud hosting and deployment platform.
- π Chart.js - Interactive charts and data visualization.
- π Custom Visualizations - Tailored sentiment display components.
- βοΈ Node.js (version 16.0 or higher).
- π¦ npm (version 8.0 or higher)/yarn.
- Clone the repository:
git clone https://github.com/SiyamthandaD/Sentiment-Application.git cd Sentiment-Application - Install dependencies:
npm install # or yarn install - Set up environment variables (if required)
# Create a .env file in the root directory # Add your API keys and configuration REACT_APP_GEMINI_API_KEY=your_api_key_here
- Run the development server:
npm start # or yarn start - Open your browser Navigate to http://localhost:3000 to view the application
- npm start - Runs the app in development mode.
- npm run build - Builds the app for production.
- npm test - Launches the test runner.
- npm run eject - Ejects from Create React App (one-way operation)
- Basic Text Analysis
- Enter your text in the input field.
- View real-time sentiment results.
- Analyze polarity scores and emotional tone.
- Advanced Features
- Explore detailed emotion breakdowns.
- Review historical analysis data.
- Export results for reporting.
- API Integration
- Connect with Google Cloud Natural Language API.
- Customize analysis parameters.
- Scale for high-volume text processing.
- Sentiment Application
Sentiment-Application/ βββ public/ # Static assets β βββ index.html # Main HTML template β βββ favicon.ico # Application favicon β βββ manifest.json # PWA manifest βββ src/ # Source code β βββ components/ # React components β β βββ AnalysisChart/ # Data visualization components β β βββ EmotionDisplay/ # Emotion visualization β β βββ HistoryPanel/ # Analysis history β β βββ InputArea/ # Text input components β β βββ ResultsPanel/ # Results display β βββ services/ # API and external services β β βββ geminiAPI.js # Gemini API integration β β βββ sentimentService.js # Sentiment analysis logic β βββ utils/ # Utility functions β β βββ textProcessor.js # Text preprocessing β β βββ formatters.js # Data formatting β βββ hooks/ # Custom React hooks β β βββ useSentiment.js # Sentiment analysis hook β β βββ useHistory.js # History management β βββ styles/ # Styling files β β βββ tailwind.css # Tailwind imports β β βββ components.css # Component-specific styles β βββ App.js # Root application component β βββ App.css # Main application styles β βββ index.js # Application entry point βββ package.json # Project dependencies and scripts βββ netlify.toml # Netlify deployment configuration
- InputArea - Text input and real-time processing.
- ResultsPanel - Display sentiment scores and analysis.
- AnalysisChart - Visual representation of sentiment data.
- EmotionDisplay - Detailed emotion classification.
- HistoryPanel - Previous analysis tracking.
- The application integrates with Google's Gemini API for advanced natural language processing:
// Example API integration const analyzeSentiment = async (text) => { const response = await fetch('https://api.gemini.google.com/v1/analyze', { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ text: text }) }); return await response.json(); };
- The application is configured for seamless deployment on Netlify:
- Automatic Deployments: Connected to GitHub for CI/CD.
- Environment Variables: Secure API key management.
- Performance Optimization: Built-in caching and CDN.
- This creates an optimized production build in the build folder.
npm run build
We welcome contributions from the community! Whether you're fixing bugs, adding new features, or improving documentation, your help is appreciated.
- Fork the repository.
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow React best practices and component patterns.
- Ensure responsive design for all components.
- Maintain accessibility standards.
- Write clear commit messages.
- Update documentation for new features.
- This project is licensed under the MIT License - see the LICENSE file for details.
- Technologies & Services
- Google Gemini API - For powerful natural language processing capabilities.
- React Community - For excellent documentation and ecosystem.
- Chart.js - For beautiful and accessible data visualizations.
- Tailwind CSS - For efficient and consistent styling.
- Netlify - For seamless deployment and hosting.
- Inspiration
- Natural Language Processing research and applications.
- User experience design principles for data visualization.
- Open-source sentiment analysis tools and libraries.
Built with β€οΈ by Siyamthanda Dlakavu
Understanding emotions through technology, one analysis at a time.