Einstein Platform Services

Community Sentiment Model

Einstein Language offers a pre-built sentiment model that you can use as long as you have a valid JWT token. This model has three classes:

  • positive
  • negative
  • neutral

Use the community sentiment model to classify text without building your own custom model. This model was created from data that comes from multiple sources. The data is short snippets of text, about one or two sentences, and similar to what you would find in a public community or Chatter group, a review/feedback forum, or enterprise social media.

This cURL command sends in a text string and returns a prediction from the model. You call the pre-built model the same way you call a custom model, but instead of passing in your own modelId, you pass in a modelId of CommunitySentiment. See Prediction for Sentiment].

curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "modelId=CommunitySentiment" -F "document=the presentation was great and I learned a lot"  https://api.einstein.ai/v2/language/sentiment

The model returns a result similar to the following JSON.

{
  "probabilities": [
    {
      "probability": 0.9435403,
      "label": "positive"
    },
    {
      "probability": 0.031840604,
      "label": "negative"
    },
    {
      "probability": 0.02461909,
      "label": "neutral"
    }
  ],
  "object": "predictresponse"
}

Updated 13 days ago

Community Sentiment Model


Einstein Language offers a pre-built sentiment model that you can use as long as you have a valid JWT token. This model has three classes:

  • positive
  • negative
  • neutral

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.