.. _json_apps_sentiments: Sentiments Results Schema for JSON *********************************** The ``SentimentsResults`` schema describes the structure of the JSON data returned from the :ref:`Sentiments application ` by the :ref:`SDK ` or the :ref:`Portal `. Definition ========== The ``SentimentsResults`` schema is defined as: * ``array[SentimentResult]`` -- The list of sentiments found in the document * **positive** (``str``) -- The percentage of positive expressions found in the document * **negative** (``str``) -- The percentage of negative expressions found in the document with ``SentimentResult`` defined as: * ``object`` -- The sentiment information * **polarity** (``str``) -- the polarity of the sentiment, either positive or negative. * **text** (``str``) -- The sentiment itself * **object** (``str``) -- The object to which the sentiment refers to * **adjective** (``str``) -- When the polarity comes from an adjective, like 'beautiful' * **noun** (``str``) -- When the polarity comes from a noun, like 'crisis' * **verb** (``str``) -- When the polarity comes from a verb, like 'hate' * **expression** (``str``) -- When the polarity comes from a verb, like 'make waves' * **begin_offset** (``int``) -- The begin offset of the sentiment. * **end_offset** (``int``) -- The end offset of the sentiment. Example ======= The following is an example of the JSON results for this application: .. include:: ../../apps/sentiments_results.inc