Sentiment analysis API extracts sentiment in a given string of text. Sentiment analysis, also called opinion mining, uses natural language processing, text analysis and computational linguistics to identify and detect polarity from the input text.
Sentiment Analysis can be used through the platform and API.
Sentiment Analysis with Eden AI API
Eden AI API is very simple. The documentation and endpoint is unique for all Sentiment Analysis providers. Those providers are selected as a parameter. To use the API, you can access to Sentiment Analysis ).
The first step to using Invoice Parser API is to install Python's requests package, that will allow you to call Eden AI API.
Next, you'll need to install Python's JSON package in order to read and print the result of the API request.
To perform Sentiment Analysis, you'll need to create an account on Eden AI for free. Then, you will be able to get your API key directly from the homepage with free credits offered by Eden AI.
Now that you have imported packages on Python and got your API key, you will be able to detect sentiment in your text. With Eden AI, you can choose from a wide range of different engines you want for Sentiment Analysis.
To help you choose the best provider according to your needs and type of project, feel free to browse our list of Sentiment Analysis providers.
Here is the Python script you need to write on your notebook:
As shown above, we called two different Sentiment Analysis engines. Eden AI API will then return in its JSON response results of those providers. Once the request is done, you will be able to get the result with this print:
Here is an example of a Sentiment Analysis API response:
Sentiment Analysis on Eden AI platform
You just need to put your input text and precise the providers you want to call and language of your text.
Using Eden AI platform, you will be able to see the detailed result with execution time and performance.
Updated 5 months ago