Sentic API


Sentic API provides the semantics and sentics (i.e., the denotative and connotative information) associated with the concepts of SenticNet 4, a semantic network of commonsense knowledge that contains 50,000 nodes (words and multiword expressions) and thousands of connections (relationships between nodes).

senticnet

The basic API method for getting all the available information associated with a specific SenticNet concept is http://sentic.net/api/LANGUAGE/concept/CONCEPT_NAME where LANGUAGE is a two-letter parameter specifying the target language (full list below) and CONCEPT_NAME is either a single-word or a multi-word expression in the target language (please note that multi-word concepts shall be separated by underscore and not space). More fine-grained methods selectively return only semantics, sentics, moodtags, and polarity, respectively:
http://sentic.net/api/LANGUAGE/concept/CONCEPT_NAME/semantics
http://sentic.net/api/LANGUAGE/concept/CONCEPT_NAME/sentics
http://sentic.net/api/LANGUAGE/concept/CONCEPT_NAME/moodtags
http://sentic.net/api/LANGUAGE/concept/CONCEPT_NAME/polarity
Polarity, in particular, consists of both value (positive or negative) and intensity (a floating number between -1 and +1), which can be queried as follows::
http://sentic.net/api/LANGUAGE/concept/CONCEPT_NAME/polarity/value
http://sentic.net/api/LANGUAGE/concept/CONCEPT_NAME/polarity/intensity

The full set of conceptual features associated with the concept meet friend in English, for example, can be retrieved with the command http://sentic.net/api/en/concept/meet_friend

sentic api

In case only the semantics associated with meet friend are needed, e.g., for gisting or auto-categorization tasks, these can be obtained through http://sentic.net/api/en/concept/meet_friend/semantics

sentic api semantics

Similarly, the sentics associated with the same concept, useful for tasks such as emotion recognition or affective HCI, can be retrieved with the command http://sentic.net/api/en/concept/meet_friend/sentics

sentic api sentics

The same sentics can be interpreted in a categorical sense (as specified by the Hourglass model) through the command http://sentic.net/api/en/concept/meet_friend/moodtags

sentic api moodtags

Finally, the overall polarity associated with meet friend can be obtained through the API call http://sentic.net/api/en/concept/meet_friend/polarity

sentic api polarity

Since polarity detection is the most common sentiment analysis task, Sentic API provides two fine-grained commands for it. For polarity detection intended as a binary classification problem (positive vs. negative), polarity can be obtained with http://sentic.net/api/en/concept/meet_friend/polarity/value

sentic api polarity

For polarity detection tasks where the intensity of the polarity is required, finally, the command intensity is used http://sentic.net/api/en/concept/meet_friend/polarity/intensity

sentic api polarity

Below is a list of languages currently covered by the API. Please acknowledge the authors by citing SenticNet 4 in any research work or presentation containing results obtained in whole or in part through the use of the API (also accessible online through a Python package).

Arabic: ar
Bosnian: ba
Bulgarian: bg
Catalan: ca
Chinese: cn
Croatian: hr
Czech: cz
Danish: dk
Dutch: nl
English: en
Estonian: ee
Finnish: fi
French: fr
German: de
Greek: gr
Haitian: ht
Hebrew: he
Hindi: hi
Hmong: hm
Hungarian: hu
Indonesian: id
Italian: it
Japanese: jp
Korean: kr
Latvian: lv
Lithuanian: lt
Malay: my
Maltese: mt
Portuguese: pt
Romanian: ro
Russian: ru
Serbian: rs
Singlish: sg
Slovak: sk
Slovenian: si
Spanish: es
Thai: th
Turkish: tr
Ukrainian: ua
Urdu: ur