sentiment analysis
The sentiment Module
🇨🇴 Versión en español de este documento
The sentiment module takes one or several text snippets and returns a numerical sentiment breakdown analysis (between positive, negative, and neutral) of each snippet along with each snippet.
This overview of the sentiment module is divided into the following sections:
- Inputs and Outputs of the
sentimentModule - Available Models in the
sentimentModule - Model Parameters in the
sentimentModule - Input File Size Limit
- A Single-Module Pipeline for the
sentimentModule - Further Information on
sentimentModule IO and Clickability
Inputs and Outputs of the sentiment Module
The sentiment module accepts JSON file input. The input JSON must respect this format.
The sentiment module returns a JSON file. The returned JSON file has all input snippets, and along with each has a numerical sentiment breakdown analysis (between positive, negative, and neutral sentiment). The three sentiment scores add up to 1.0.
Available Models in the sentiment Module
You can activate any of the following models when using the sentiment module:
-
distilbert-base-uncased-finetuned-sst-2-english (default) [English]
-
bert-base-multilingual-uncased-sentiment [English, Dutch, German, French, Italian, Spanish]
-
distilbert-base-multilingual-cased-sentiments-student [English, Arabic, German, Spanish, French, Japanese, Chinese, Indonesian, Hindi, Italian, Malay, Portuguese]
-
distilroberta-finetuned-financial-news-sentiment-analysis [English]
Use the modules argument in the process method to determine what model you'd like active when you process files through the sentiment module.
Model Parameters in the sentiment Module
None of the sentiment module models are parameterizable. Consequently, when selecting what model you'll use through the process method's modules argument, params will always be set to an empty dictionary. For example:
# example model selection for sentiment module in process
modules={'sentiment': {'model':'distilroberta-finetuned-financial-news-sentiment-analysis',
'params': {}}}
Input File Size Limit
sentiment module input JSON files can currently be no larger than 3MB.
A Single-Module Pipeline for the sentiment Module
Please click here to visit the Pipeline Examples section of our documentation and review an example of a single-module pipeline for the sentiment module.
Further Information on sentiment Module IO and Clickability
Please click here to visit the Convenience Methods (and More!) documentation. There you will find two tools to learn more about the sentiment module: