skill-032
Perform sentiment analysis on customer reviews using NLP techniques to gain insights into product performance and customer satisfaction.
- License 许可
- MIT
- 最近更新
- 2026-06-04
- Stars
- ★ 8
- Forks
- 2
01 前言 Front Matter
- name
- skill-032
- description
- Perform sentiment analysis on customer reviews using NLP techniques to gain insights into product performance and customer satisfaction.
03 SKILL.md 正文
Text Sentiment Analysis
Analyze customer reviews and extract sentiment scores to understand customer opinions and trends over time.
Problem
Given a dataset of customer reviews, the goal is to evaluate the sentiment (positive, negative, neutral) expressed in each review. This provides valuable insights into customer satisfaction and product performance.
Methodology
- Text Preprocessing: Clean and prepare the text data by removing stop words, punctuation, and applying lemmatization.
- Sentiment Scoring: Use pre-trained sentiment analysis models or libraries to score the sentiment of each review.
- Aggregation: Summarize sentiment scores by product category to identify trends and areas for improvement.
Output
A DataFrame with added columns:
review: Original customer reviewsentiment_score: Float sentiment score (e.g., from -1 to 1)sentiment_label: Categorical sentiment label (positive, negative, neutral)
Installation
pip install pandas numpy nltk transformers
python -c "import nltk; nltk.download('stopwords')"
3-Step Pipeline
Step 1: Load and Preprocess Reviews (step1_load_and_preprocess.py)
- Input: CSV file of customer reviews with a
reviewcolumn. - Process: Normalize text, tokenize words, remove stop words, and lemmatize.
- Output: Cleaned DataFrame with
reviewcolumn ready for analysis.
Step 2: Analyze Sentiment (step2_sentiment_analysis.py)
- Input: Cleaned DataFrame from Step 1.
- Process: Apply sentiment analysis model to generate scores and labels for each review.
- Output: DataFrame with added
sentiment_scoreandsentiment_labelcolumns.
Step 3: Summarize Results (step3_aggregate_results.py)
- Input: DataFrame from Step 2.
- Process: Group by product category and compute average sentiment scores.
- Output: Summary DataFrame of average sentiment scores by category.
# Example of sentiment analysis using Hugging Face Transformers
from transformers import pipeline
# Load sentiment analysis pipeline
sentiment_pipeline = pipeline('sentiment-analysis')
# Example review
review = "This product is amazing!"
result = sentiment_pipeline(review)
print(result)
This skill provides a comprehensive approach to extracting sentiment from customer reviews, which can help businesses improve their products and services.
04 同仓库更多 Skills
foo
A test skill named foo
bar
飞书 — bar with quoted Chinese
agentic-skill-router
First use any clearly matching enabled local/user Agent Skill. If none matches, prefer this router for skill-shaped requests involving a named tool, API, service, CLI, platform, file format, dataset, or domain workflow, including when a generic built-in skill such as browser, Chrome, or web search also seems applicable; use built-ins directly only when explicitly requested or when the task is primarily live browsing, logged-in page operation, clicking, screenshotting, or current webpage inspection. Also use directly to audit, slim, disable, restore, or route locally installed Agent Skills across supported hosts. Examples include Vercel, Netlify, Cloudflare, Render, Playwright, Sentry, Linear, GitHub, OpenAI APIs, PDF, DOCX, PPTX, and spreadsheets.
syn-video-trim
Skill for trimming and cutting clips in the context of video files. Use when the user's task is specifically about trimming and cutting clips.
syn-video-transcode
Skill for transcoding codecs and resolutions in the context of video files. Use when the user's task is specifically about transcoding codecs and resolutions.
syn-video-thumbnail
Skill for extracting thumbnails and frames in the context of video files. Use when the user's task is specifically about extracting thumbnails and frames.