sentilyze 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -3
- package/index.js +5 -1
- package/package.json +41 -38
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Sentilyze.ai
|
|
2
2
|
|
|
3
|
-
Official Node.js SDK for [Sentilyze.ai](https://sentilyze.ai) - Analyze support tickets, feedback and reviews to get customer satisfaction and sentiment
|
|
3
|
+
Official Node.js SDK for [Sentilyze.ai](https://www.sentilyze.ai) - Analyze support tickets, feedback and reviews to get customer satisfaction and sentiment
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/sentilyze)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -28,6 +28,7 @@ console.log(result.score); // 5.2
|
|
|
28
28
|
{
|
|
29
29
|
sentiment: 'positive',
|
|
30
30
|
score: 5.2,
|
|
31
|
+
emoji: '😃',
|
|
31
32
|
summary: 'Customer expresses high satisfaction with the product',
|
|
32
33
|
tags: ['product', 'satisfaction', 'quality']
|
|
33
34
|
}
|
|
@@ -39,6 +40,7 @@ console.log(result.score); // 5.2
|
|
|
39
40
|
- ✅ **Happiness Scoring** - Measure happiness levels from 1-6 scale
|
|
40
41
|
- ✅ **AI-Powered Summary** - Get concise summaries of feedback
|
|
41
42
|
- ✅ **Tag Extraction** - Automatic keyword and topic extraction
|
|
43
|
+
- ✅ **Spam/Scam Detection** - identify irrelevant or identifying fraudulent content
|
|
42
44
|
- ✅ **Usage Tracking** - Monitor your API usage in real-time
|
|
43
45
|
- ✅ **Error Handling** - Comprehensive error messages and retry logic
|
|
44
46
|
|
|
@@ -65,6 +67,7 @@ const result = await client.analyze('Customer feedback text');
|
|
|
65
67
|
// With options
|
|
66
68
|
const result = await client.analyze('Customer feedback text', {
|
|
67
69
|
spamcheck: true, // Check for spam (Professional/Enterprise)
|
|
70
|
+
scamcheck: true, // Check for scam/fraud (Professional/Enterprise)
|
|
68
71
|
reply: true, // Generate auto-reply (Professional/Enterprise)
|
|
69
72
|
language: 'en' // Language code (Professional/Enterprise)
|
|
70
73
|
});
|
|
@@ -73,6 +76,7 @@ const result = await client.analyze('Customer feedback text', {
|
|
|
73
76
|
const result = await client.analyze({
|
|
74
77
|
feedback: 'Customer feedback text',
|
|
75
78
|
spamcheck: true,
|
|
79
|
+
scamcheck: true,
|
|
76
80
|
reply: true,
|
|
77
81
|
language: 'en'
|
|
78
82
|
});
|
|
@@ -86,7 +90,9 @@ const result = await client.analyze({
|
|
|
86
90
|
summary: string, // AI-generated summary
|
|
87
91
|
tags: string[], // Extracted keywords
|
|
88
92
|
spam: boolean, // If spamcheck was requested
|
|
93
|
+
scam: boolean, // If scamcheck was requested
|
|
89
94
|
autoReply: string, // If reply was requested
|
|
95
|
+
emoji: string, // Sentiment emoji representation
|
|
90
96
|
}
|
|
91
97
|
```
|
|
92
98
|
|
|
@@ -98,6 +104,7 @@ const result = await client.analyze('The product quality is excellent, but shipp
|
|
|
98
104
|
});
|
|
99
105
|
|
|
100
106
|
console.log(result.sentiment); // 'positive'
|
|
107
|
+
console.log(result.emoji); // '😃'
|
|
101
108
|
console.log(result.autoReply); // 'Thank you for your feedback...'
|
|
102
109
|
console.log(result.score); // 4.5
|
|
103
110
|
console.log(result.summary); // 'Mixed feedback with product praise and shipping concerns'
|
|
@@ -189,13 +196,14 @@ Get your API key at [sentilyze.ai](https://sentilyze.ai)
|
|
|
189
196
|
- 5-6: Very happy
|
|
190
197
|
- **summary**: AI-generated concise summary of the feedback
|
|
191
198
|
- **tags**: Array of extracted keywords and topics from the text
|
|
199
|
+
- **spam**: Boolean indicating if the text is identified as spam (if enabled)
|
|
200
|
+
- **scam**: Boolean indicating if the text is identified as a scam/fraud (if enabled)
|
|
192
201
|
- **usage**: Current API usage information for rate limiting and billing
|
|
193
202
|
|
|
194
203
|
## Support
|
|
195
204
|
|
|
196
|
-
- 📧 Email:
|
|
205
|
+
- 📧 Email: hello@sentilyze.ai
|
|
197
206
|
- 🌐 Website: https://www.sentilyze.ai
|
|
198
|
-
- 📚 Dashboard: https://www.sentilyze.ai/dashboard
|
|
199
207
|
|
|
200
208
|
## License
|
|
201
209
|
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sentilyze SDK - Official Node.js client for Sentilyze.ai
|
|
3
3
|
* Analyze sentiment and happiness levels from customer feedback
|
|
4
|
-
* @version 1.1
|
|
4
|
+
* @version 1.2.1
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
class SentilyzeClient {
|
|
@@ -75,6 +75,7 @@ class SentilyzeClient {
|
|
|
75
75
|
* @param {Object} [options] - Configuration options (when input is a string)
|
|
76
76
|
* @param {string} [input.feedback] - Text to analyze (when using options object)
|
|
77
77
|
* @param {boolean} [input.spamcheck=false] - Check for spam (Professional/Enterprise only)
|
|
78
|
+
* @param {boolean} [input.scamcheck=false] - Check for scam/fraud (Professional/Enterprise only)
|
|
78
79
|
* @param {boolean} [input.reply=false] - Generate auto-reply (Professional/Enterprise only)
|
|
79
80
|
* @param {string} [input.language='en'] - Language code (e.g. 'en', 'es', 'fr') (Professional/Enterprise only)
|
|
80
81
|
* @returns {Promise<Object>} Analysis results with sentiment, score, summary, tags, and usage info
|
|
@@ -85,6 +86,7 @@ class SentilyzeClient {
|
|
|
85
86
|
* // With options
|
|
86
87
|
* const result = await client.analyze('This product is amazing!', {
|
|
87
88
|
* spamcheck: true,
|
|
89
|
+
* scamcheck: true,
|
|
88
90
|
* reply: true,
|
|
89
91
|
* language: 'es'
|
|
90
92
|
* });
|
|
@@ -93,6 +95,7 @@ class SentilyzeClient {
|
|
|
93
95
|
* const result = await client.analyze({
|
|
94
96
|
* feedback: 'This product is amazing!',
|
|
95
97
|
* spamcheck: true,
|
|
98
|
+
* scamcheck: true,
|
|
96
99
|
* reply: true,
|
|
97
100
|
* language: 'es'
|
|
98
101
|
* });
|
|
@@ -120,6 +123,7 @@ class SentilyzeClient {
|
|
|
120
123
|
const body = {
|
|
121
124
|
feedback,
|
|
122
125
|
includeSpamCheck: finalOptions.spamcheck || finalOptions.includeSpamCheck || false,
|
|
126
|
+
includeScamCheck: finalOptions.scamcheck || finalOptions.includeScamCheck || false,
|
|
123
127
|
includeAutoReply: finalOptions.reply || finalOptions.includeAutoReply || false,
|
|
124
128
|
language: finalOptions.language || 'en'
|
|
125
129
|
};
|
package/package.json
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sentilyze",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "Official Node.js SDK for Sentilyze.ai - Analyze sentiment and
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"keywords": [
|
|
10
|
-
"sentilyze",
|
|
11
|
-
"sentiment",
|
|
12
|
-
"analysis",
|
|
13
|
-
"sentiment-analysis",
|
|
14
|
-
"happiness",
|
|
15
|
-
"ai",
|
|
16
|
-
"nlp",
|
|
17
|
-
"customer-feedback",
|
|
18
|
-
"gpt-4",
|
|
19
|
-
"text-analysis",
|
|
20
|
-
"analytics",
|
|
21
|
-
"insights",
|
|
22
|
-
"word-cloud",
|
|
23
|
-
"customer-satisfaction"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"url": "https://github.com/yourusername/sentilyze-sdk
|
|
33
|
-
},
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "sentilyze",
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"description": "Official Node.js SDK for Sentilyze.ai - Analyze sentiment, happiness, spam and scam from customer feedback with AI",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"sentilyze",
|
|
11
|
+
"sentiment",
|
|
12
|
+
"analysis",
|
|
13
|
+
"sentiment-analysis",
|
|
14
|
+
"happiness",
|
|
15
|
+
"ai",
|
|
16
|
+
"nlp",
|
|
17
|
+
"customer-feedback",
|
|
18
|
+
"gpt-4",
|
|
19
|
+
"text-analysis",
|
|
20
|
+
"analytics",
|
|
21
|
+
"insights",
|
|
22
|
+
"word-cloud",
|
|
23
|
+
"customer-satisfaction",
|
|
24
|
+
"spam-detection",
|
|
25
|
+
"scam-detection",
|
|
26
|
+
"fraud-detection"
|
|
27
|
+
],
|
|
28
|
+
"author": "Sentilyze.ai",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/yourusername/sentilyze-sdk.git"
|
|
33
|
+
},
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/yourusername/sentilyze-sdk/issues"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://sentilyze.ai",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=18.0.0"
|
|
40
|
+
}
|
|
41
|
+
}
|