Sentiment Analysis is a powerful feature in the AI Toolkit that helps you understand the sentiment of text data. This API provides an easy way to analyze and classify the sentiment of a given text into positive, negative, or neutral.

Key Features

  • Accurate Sentiment Classification: The API can classify sentiments with high accuracy, ensuring you get reliable results.
  • Supports Multiple Languages: Our API supports sentiment analysis in various languages, making it versatile for global use.
  • Fast and Scalable: The API is designed to handle large volumes of data efficiently.

Usage

To use the Sentiment Analysis API, you need to send a POST request to the following endpoint:

POST /api/sentiment-analysis

Request Format

{
  "text": "Your text data here",
  "language": "en"  // Optional: specify the language of the text, default is auto-detection
}

Response Format

{
  "sentiment": "positive/negative/neutral",
  "confidence": "0.85"  // A value between 0 and 1 indicating the confidence level of the classification
}

Example

Here's an example of a successful request and response:

Request:

POST /api/sentiment-analysis
Content-Type: application/json

{
  "text": "I love this product!",
  "language": "en"
}

Response:

{
  "sentiment": "positive",
  "confidence": "0.95"
}

Further Reading

For more detailed information about the Sentiment Analysis API, please refer to the API Reference.

Go to API Reference