Aller au contenu principal

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​

ParameterTypeDescription
textstringText to analyze

Optional​

ParameterTypeDefaultDescription
analysisTypestringallType: 'sentiment', 'entities', 'keywords', 'all'
languagestringauto-detectLanguage 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

Next Steps​