Text Analysis Service
Analyze text content with YODI's text analysis API.
Endpoint​
POST https://admin.yodi.tg/api/ai/analyze
Description​
Analyze text to extract sentiment, entities, keywords, and more.
Parameters​
Required​
| Parameter | Type | Description |
|---|---|---|
text | string | Text to analyze |
Optional​
| Parameter | Type | Default | Description |
|---|---|---|---|
analysisType | string | all | Type: 'sentiment', 'entities', 'keywords', 'all' |
language | string | auto-detect | Language code |
Example Request​
curl -X POST "https://admin.yodi.tg/api/ai/analyze" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "I love this product! It changed my life.",
"analysisType": "sentiment"
}'
Example Response​
{
"message": "SUCCESS",
"error": false,
"data": {
"sentiment": "positive",
"confidence": 0.94,
"entities": [
{
"text": "product",
"type": "PRODUCT"
}
]
},
"status": 200
}
Sentiment Scores​
- Positive: confidence ≥ 0.5
- Neutral: confidence < 0.5
Use Cases​
- Social media monitoring
- Customer feedback analysis
- Brand sentiment tracking
- News article classification
- Chat support routing