.. _positivity_bert: Sentiment (RoBERTa) =================== High-Level Intuition ********************* This feature measures the positivity of a message using RoBERTa's generated valence sentiment markers. Citation ********* Twitter-roBERTa-base-sentiment model from the `Hugging Face Transformers library `_. Implementation Basics ********************** The code runs inference on the the Twitter-roBERTa-base-sentiment model to predict how relatively positive, negative, and neutral a message is on a 0-1 scale. Implementation Notes/Caveats ***************************** This feature precomputes these valence ratings in the data preprocessing step and stores them locally; this essentially "caches" the sentiment markers, preventing the case where a user spends extra time regenerating these ratings on subsequent requests. Interpreting the Feature ************************* This feature returns 3 general sentiment markers: **positive_bert**, **negative_bert**, and **neutral_bert**. Each score ranges from 0-1, and all three scores add up to 1. This feature measures the extent to which a particular utterance aligns with each label, relative to the other labels. Below is an example output file: .. list-table:: Output File :widths: 40 20 20 20 :header-rows: 1 * - message - positive_bert - negative_bert - neutral_bert * - The idea sounds great! - 0.97 - 0.01 - 0.02 * - I disagree, this idea is terrible. - 0.02 - 0.92 - 0.06 * - Who's idea was it? - 0.05 - 0.35 - 0.60 Related Features ***************** This feature is one of several that measure sentiment. Other sentiment-related features include Negative_Emotion and Positive_Emotion, which are attributes of :ref:`politeness_receptiveness_markers`; :ref:`textblob_polarity`; and LIWC (a relevant column name being positive_affect_lexical_per_100). A z-scored version of the positivity RoBERTa score is also included separately (:ref:`positivity_z_score`).