sentiment-analyzer
npx machina-cli add skill guia-matthieu/clawfu-skills/sentiment-analyzer --openclawFiles (1)
SKILL.md
3.6 KB
Sentiment Analyzer
Analyze sentiment in customer feedback using transformer models - understand what your customers really feel at scale.
When to Use This Skill
- Review analysis - Process hundreds of product reviews
- NPS feedback - Categorize open-ended survey responses
- Social listening - Monitor brand sentiment on social media
- Campaign feedback - Evaluate response to marketing campaigns
- Support insights - Categorize support ticket sentiment
What Claude Does vs What You Decide
| Claude Does | You Decide |
|---|---|
| Structures analysis frameworks | Metric definitions |
| Identifies patterns in data | Business interpretation |
| Creates visualization templates | Dashboard design |
| Suggests optimization areas | Action priorities |
| Calculates statistical measures | Decision thresholds |
Dependencies
pip install transformers torch pandas click
# Or for lighter CPU-only version:
pip install textblob vaderSentiment pandas click
Commands
Analyze Text
python scripts/main.py analyze "This product exceeded my expectations!"
python scripts/main.py analyze "The service was terrible and slow."
Batch Analysis
python scripts/main.py batch reviews.csv --column text
python scripts/main.py batch feedback.csv --column comment --output results.csv
Generate Report
python scripts/main.py report reviews.csv --column text --output sentiment-report.html
Examples
Example 1: Analyze Product Reviews
# Process CSV of reviews
python scripts/main.py batch amazon-reviews.csv --column review_text
# Output: amazon-reviews_sentiment.csv
# review_text | sentiment | score | label
# "Absolutely love this!" | positive | 0.95 | Very Positive
# "It's okay, nothing special" | neutral | 0.52 | Neutral
# "Worst purchase ever" | negative | 0.12 | Very Negative
Example 2: NPS Feedback Categorization
# Analyze NPS survey responses
python scripts/main.py report nps-responses.csv --column feedback
# Output: sentiment-report.html
# Summary:
# - Positive: 62% (mainly: product quality, support)
# - Neutral: 23% (mainly: pricing concerns)
# - Negative: 15% (mainly: shipping delays)
Sentiment Categories
| Score Range | Label | Interpretation |
|---|---|---|
| 0.8 - 1.0 | Very Positive | Enthusiastic, recommend |
| 0.6 - 0.8 | Positive | Satisfied, happy |
| 0.4 - 0.6 | Neutral | Mixed or indifferent |
| 0.2 - 0.4 | Negative | Disappointed, frustrated |
| 0.0 - 0.2 | Very Negative | Angry, will churn |
Skill Boundaries
What This Skill Does Well
- Structuring data analysis
- Identifying patterns and trends
- Creating visualization frameworks
- Calculating statistical measures
What This Skill Cannot Do
- Access your actual data
- Replace statistical expertise
- Make business decisions
- Guarantee prediction accuracy
Related Skills
- social-analytics - Get social data to analyze
- content-repurposer - Use insights for content
Skill Metadata
- Mode: centaur
category: analytics
subcategory: nlp
dependencies: [transformers, torch, pandas]
difficulty: intermediate
time_saved: 6+ hours/week
Source
git clone https://github.com/guia-matthieu/clawfu-skills/blob/main/skills/analytics/sentiment-analyzer/SKILL.mdView on GitHub Overview
Sentiment Analyzer uses transformer models to gauge customer sentiment at scale. It helps analyze reviews, NPS feedback, social mentions, campaign responses, and support tickets to turn text into actionable sentiment signals.
How This Skill Works
The skill leverages transformer-based models to assign sentiment scores and labels. It supports batch analysis and report generation, with commands to analyze text, batch process files, and generate HTML reports.
When to Use It
- Review analysis (process hundreds of product reviews)
- NPS feedback categorization (categorize open-ended survey responses)
- Social listening (monitor brand sentiment on social media)
- Campaign feedback evaluation (evaluate response to marketing campaigns)
- Support insights (categorize support ticket sentiment)
Quick Start
- Step 1: Install dependencies (pip install transformers torch pandas click)
- Step 2: Run a quick analyze (python scripts/main.py analyze 'This product is amazing')
- Step 3: Generate a report or batch (python scripts/main.py batch reviews.csv --column text)
Best Practices
- Define clear sentiment labels and score thresholds
- Use labeled validation data to calibrate scores
- Segment data by domain (e.g., reviews vs. support tickets)
- Monitor drift and revalidate periodically
- Combine sentiment with topic or intent signals for actionability
Example Use Cases
- Analyze Product Reviews: Process a CSV of reviews to surface sentiment and scores per item
- NPS Feedback Categorization: Classify open-ended survey comments into sentiment buckets
- Social Listening: Track and compare brand sentiment across social media mentions
- Campaign Feedback: Assess customer reactions to a recent marketing campaign
- Support Insights: Prioritize tickets by sentiment to frontload critical issues
Frequently Asked Questions
Add this skill to your agents