Sentiment Analysis 2.1: Migration guide

We have released a new version of our sentiment analysis API, Sentiment Analysis. In Sentiment Analysis 2.1:

  • We’ve changed how the sentiment model is sent in order to enable the use of custom sentiment models across all the APIs that support sentiment analysis.
  • Support to analyze documents and URLs has been added.
  • A configurable interface language has been added to improve multilingual analyses.

As you would see, this is a minor version upgrade, so the migration process will be fast and painless. In this post, we explain what you need to know to migrate your applications from Sentiment Analysis 2.0 to Sentiment Analysis 2.1.

Request

The most relevant changes in the request are the following:

Sentiment Analysis 2.0 Sentiment Analysis 2.1
Endpoint http://api.meaningcloud.com/sentiment-2.0 http://api.meaningcloud.com/sentiment-2.1
Parameter ilang Did not exist. It has the same values available as lang.
Parameter url Did not exist. URL to analyze.
Parameter doc Did not exist. Document to analyze.
Parameter lang Did not exist. Language in which the txt/url/doc will be analyzed.
Parameter model
  • general_en: generic model in English
  • general_es: generic model in Spanish
  • general_fr: generic model in French
  • auto: automatically detect the language of the text and apply the corresponding model.
It has been divided into two parameters: model (name of the model to use) and lang (language of the text). These two new parameters have the following equivalences to the old model:

Sentiment 2.0 Sentiment 2.1
model=general_en model=general, lang=en
model=general_es model=general, lang=es
model=general_fr model=general, lang=fr
model=auto model=general, lang=auto

All the other parameters from Sentiment Analysis 2.0 not explicitly mentioned behave exactly the same in Sentiment Analysis 2.1. The API response remains identical in this new version.

Again, all the details can be found in the Sentiment Analysis 2.1 documentation. Remember! Sentiment Analysis 2.0 will be retired on July, 7th, so make sure to adapt your integration by then. If you have any questions or issues during the migration, we are always available either through our support form, or just by writing us to support@meaningcloud.com.


Leave a Reply

Your email address will not be published. Required fields are marked *

*
*