Sentiment Analysis (document level)

The document-level Sentiment Analysis module analyzes a piece of text and determines whether the text has a positive or negative sentiment.

It supports any sentiment-bearing text (that is, texts which are not too short, numeric, include only a street address, or an IP address). This module works best if the input text is over 40 characters in length.

This module supports these languages:
  • English (US and UK)
  • French
  • German
  • Italian
  • Spanish

Configuration options

This module never runs automatically during a Data Processing workflow.

In addition, the Transform API has a getSentiment function that wraps this module.


The default output is a single text that is one of these values:

Note that NULL is returned for any input which is either null or empty.

The output string is subsequently ingested into the Dgraph as a single-assign string Dgraph attribute. The name of the output attribute is <attribute>_doc_sent.