AI驱动的API
产品评论情感检查器
分析客户评论并返回情感评分。
产品评论情感分析API解析客户的产品评论,并提供其情感(POSITIVE/NEGATIVE/NEUTRAL)以及0-100%之间的评分。
此API非常适合生成任何在线商店的情感报告,提供有关客户反馈的宝贵见解。
开发人员可以使用此API来增强电子商务平台、客户反馈系统或情感分析工具。它自动化分析过程,帮助企业理解客户意见并改进其产品。使用案例包括创建情感报告、增强客户服务策略以及根据客户反馈完善产品描述。
NEUTRAL情感的评分将始终等于0。
AI 工作涉及两个关键步骤:
- 提交AI任务: 通过发送工作请求来启动流程。
- 监控和接收结果: 持续检查作业状态,并在成功完成后获取最终输出。
相关SDK/库
Step 1. 提交 AI 工作请求
端点: POST - /v1/ecommerce/review_sentiment
| 属性 | 类型 | 必填 | 描述 |
|---|---|---|---|
| content | 字符串 | 是 | 提供评论文本以分析情感。 |
请求示例:
{
"content": "I got a variant of this laptop 4090 with miniLED and surprise, it does not work in SDR and if you enable HDR to make the miniLED work it causes so much back light bleed you can see light follow the mouse and around the the text. I found out Razer has two variants of the panel one called BOE and one called AUO. The BOE i got is whats broken, and they have the audacity to sell an inferior version of the laptop (early 2023) with a huge faulty screen.refer to my images to see how bad the MiniLED looks when HDR is enable, and without HDR well, the miniLED simply does not work. Great job Razer, will be returning this as I have no way of telling if I get the BOE or AUO variant of the screen. Do some research on this if you going for the MiniLED version.Other than the screen which is one of main reasons you likely buying this, the performance is amazing and temps are great."
}
响应示例:
{
"status_url": "https://sharpapi.com/api/v1/content/translate/job/status/5de4887a-0dfd-49b6-8edb-9280e468c210",
"job_id": "5de4887a-0dfd-49b6-8edb-9280e468c210"
}
Step 2. 监控并获取 AI 工作结果
端点: GET - /v1/ecommerce/review_sentiment/job/status/:uuid
用于检查请求的 API 工作进度的端点。
结果示例:
{
"data": {
"type": "api_job_result",
"id": "f245cf5a-26da-4c02-91d7-01606a1a8759",
"attributes": {
"status": "success",
"type": "ecommerce_review_sentiment",
"result": {
"opinion": "NEGATIVE",
"score": 75,
"emotion": "frustration",
"urgency": "moderate",
"topics": [
{
"topic": "screen_quality",
"sentiment": "negative",
"mention_count": 3
},
{
"topic": "performance",
"sentiment": "positive",
"mention_count": 1
},
{
"topic": "backlight_bleed",
"sentiment": "negative",
"mention_count": 2
}
],
"loyalty_signal": "detractor",
"recommended_action": "investigate_issue",
"language": "en",
"review_quality": "detailed"
}
}
}
}