Unicorn NLP

Language Understanding APIs

Unicorn NLP

Language Understanding APIs

API Documentation (Semantic Analysis for App Reviews)

API Documentation -> Semantic Analysis for App Reviews

Here, we described input/output for Semantic Analysis for App Reviews. We also called it Sentiment Analysis 2.0, so if you are using an old API, the input/output description is the same.

This API is very simple to use and does not require any linguistic or machine learning skills. Reading the whole documentation should take no more than 15 mins. After that, you can start using APIs. If something is not clear, you need help or have other questions, contact us.

API is available via RapidAPI (links below), so you need to apply RapidAPI Key that you get after you sign up.
Below, you will find RapidAPI link to publicly available API for App Reviews:

API Documentation for Semantic Analysis for App Reviews

Semantic Analysis API consists of only one endpoint (method) - process. It allows you to process unstructured review or other user-generated content and transform it into ready-to-use structured data (JSON with a list of semantic models, categories, and a general sentiment).

We took examples from documentation for Semantic Analysis for Hotel Review (we will update it soon with an app review example). Everything besides content data (hotel content vs app content) - all names of fields, type of vars, etc., are the same as in Semantic Analysis for App Reviews. The only difference in the below examples is a field "feature". In Semantic Analysis for App Reviews, there is no output field: "feature".

process(title, text) [Endpoint]

This endpoint returns all results in one output: general sentiment, categories, and a semantic analysis. So, you pay only once. Below, you will find the description of each field, both input, and output.

Input (POST):

[Maximum length in total: 1000 characters.]

Example input (POST):

Let's have a look how this API will process this example text input.

Output (JSON):

Firstly, we describe the API output and what fields each section consists of and comment on results.
Secondly, we will show how the whole JSON output looks like for a given input example.

The output is divided into 5 sections:

We wanted to keep this API compatible with current technologies available (Sentiment Analysis, Aspect-based Sentiment Analysis, Keyword/Category/Topic Analysis, etc.). The first two fields (general_sentiment, categories) are a result of this and allows to provide better accuracy in current interfaces/systems compared to currently available technologies. 3rd section (semantic_analysis) is a heart of Semantic Analysis and allows you to go deeper both with accuracy and resolution of the analysis. If you need different output fields or would like to get a private customized version of this API, contact us.

Below, you will find a description of each section with examples of API output.

1. general_sentiment - what is the sentiment score of the whole review. Sentiment score range from -2 (very negative) to +2 (very positive).

Example output:

In this example, the general sentiment of the reviews (sentiment score) is 0 (neutral).

2. categories - list of all categories detected in the processed review. 0 => 1st category with details, 1 => 2nd category, etc.

Example output:

In this example, there are 2 categories: room and addons. room was 3 times present (count=3) in the processed review, addons was 2 times present (count=2). In both cases, the sentiment_score of a given categories is 0 (neutral).

3. semantic_analysis

Example output:

In this example, 5 semantic models were detected. Each semantic model consist of their id (id_semantic_model), name (name_semantic_model), a quick description what this model describes (description), opposite semantic model if present (id_opposite_semantic_model), category (category), aspect (aspect), feature (feature), sentiment score / polarity (polarity), and a sentence / text segment in which it was detected (segment).
Each semantic model has its category, aspect and feature. Features are grouped semantically to ease the process of aggregating the data, to ease the search process, to display it on analytical dashboards, or to display it to the user
In the 2nd detected semantic model (id_semantic_model=11, name_semantic_model="room_comfy_nice"), id_opposite_semantic_model is null. It means that in this API there is no semantic model that would be opposite in meaning, e.g., "room_uncomfy". Mainly, it is because people do not describe in reviews that the room was not comfy (it was less than 0.1% in reviews). If they write about the negative experiences of the room, they rather describe it as small, smelly, noisy, etc.

If you have some other questions regarding semantic_analysis output, need more information, or would like to modify semantic models for your needs/your data, contact us.

Example of a JSON API OUTPUT of Semantic Analysis for Reviews API:

Above, we described each section of the output and displayed it in a more human-friendly form. Below, you will find the format of how our API returns JSON output. The example is the same as above.

Input (POST):

Output (JSON):

Example of a JSON API OUTPUT

      ""description":"The room/hotel was quiet, good acoustic, little street noise, not hear any noise, well soundproofed",
      "segment":"Room was nice and spacy, also very quiet"},
      "description":"The room was comfortable and cozy, ample, nice, good, room nice, good, accommodating",
      "feature":"nice, comfy",
      "polarity":1,"segment":"Room was nice and spacy, also very quiet"},
      "description":"The bathroom was dirty, bathroom amenities dirty, needs cleaning, mold, mildew, gross, urine, hair, dissatisfied with the cleanliness",
      "segment":"but bathroom was very dirty"},
      "description":"TV might be old with limited channels, tv bad, not working, poor channels, no premium channels, no remote, problems with tv",
      "feature":"bad, poor channels",
      "segment":"There was only 10 TV channels"},
      "description":"The fitness center was great, gym, good, great, awesome, excellent",
      "segment":"but the fitness was good equipped"}},

What's next

Go to Rapid API and you can start using Semantic Analysis APIs today.

Other public APIs by Unicorn NLP

Contact us to prepare a custom-made API designed to your data and your needs.

Go to product sites of Semantic Analysis APIs to get more description of what it detects and what this technology can do to your business

If you have some other questions, do not hesitate tocontact us.