mcpField
S
sentiment-analyzer

sentiment-analyzer

github.com/guia-matthieu数据与数据库150217 次安装4 周前更新
代码仓库

关于 sentiment-analyzer

sentiment-analyzer 是一款命令行技能,可用 Transformer 模型或较轻量的纯 CPU 方案分析客户文本。它支持单条文本与 CSV 批量分析,并可生成 HTML 报告,适用于反馈和评论处理。

主要功能

  1. 01分析文本情感
  2. 02批量处理 CSV
  3. 03生成 HTML 报告
  4. 04支持 Transformer 和纯 CPU 方案

适用场景

  1. 01归类产品评论
  2. 02分析开放式 NPS 回复
  3. 03评估支持工单情感
  4. 04分析营销活动反馈

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/guia-matthieu/clawfu-skills --skill sentiment-analyzer

安装后在 Claude Code 中输入/sentiment-analyzer确认已加载。

附带文件scripts/main.pyscripts/requirements.txt

详细介绍

情感分析器

使用 Transformer 模型分析客户反馈中的情感——大规模了解客户的真实感受。

何时使用此技能

  • 评论分析 - 处理数百条产品评论
  • NPS 反馈 - 对开放式调查回复进行分类
  • 社交聆听 - 监控社交媒体上的品牌情感
  • 营销活动反馈 - 评估营销活动的反响
  • 支持洞察 - 对支持工单中的情感进行分类

Claude 的工作与由你决定的事项

Claude 的工作由你决定
构建分析框架指标定义
识别数据中的模式业务解读
创建可视化模板仪表板设计
提出优化方向行动优先级
计算统计指标决策阈值

依赖项

pip install transformers torch pandas click
# Or for lighter CPU-only version:
pip install textblob vaderSentiment pandas click

命令

分析文本
python scripts/main.py analyze "This product exceeded my expectations!"
python scripts/main.py analyze "The service was terrible and slow."
批量分析
python scripts/main.py batch reviews.csv --column text
python scripts/main.py batch feedback.csv --column comment --output results.csv
生成报告
python scripts/main.py report reviews.csv --column text --output sentiment-report.html

示例

示例 1:分析产品评论
# 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
示例 2:NPS 反馈分类
# 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)

情感类别

分数范围标签解读
0.8 - 1.0非常积极热情,愿意推荐
0.6 - 0.8积极满意,开心
0.4 - 0.6中性喜忧参半或无感
0.2 - 0.4消极失望,沮丧
0.0 - 0.2非常消极愤怒,可能流失

技能边界

此技能擅长的事项
  • 构建数据分析框架
  • 识别模式和趋势
  • 创建可视化框架
  • 计算统计指标
此技能无法完成的事项
  • 访问你的实际数据
  • 取代统计学专业知识
  • 做出业务决策
  • 保证预测准确性

相关技能

技能元数据

  • 模式:centaur
category: analytics
subcategory: nlp
dependencies: [transformers, torch, pandas]
difficulty: intermediate
time_saved: 6+ hours/week

评论

支持 Markdown