class_docstr: Give a sentiment intensity score to sentences.
class_docstr_tok: ["Give","a","sentiment","intensity","score","to","sentences","."]
docstr: Return a float for sentiment strength based on the input text.
  Positive values are positive valence, negative value are negative
  valence.
docstr_tok: ["Return","a","float","for","sentiment","strength","based","on","the","input","text",".","Positive","values","are","positive","valence",",","negative","value","are","negative","valence","."]
code: def polarity_scores(self, text):
      """
      Return a float for sentiment strength based on the input text.
      Positive values are positive valence, negative value are negative
      valence.
      """
      # convert emojis to their textual descriptions
      text_no_emoji = ""
      prev_space = True
      for chr in text:
          if chr in self.emojis:
              # get the textual description
              description = self.emojis[chr]
              if not prev_space:
                  text_no_emoji += " "
              text_no_emoji += description
              prev_space = False
          else:
              text_no_emoji += chr
              prev_space = chr == " "
      text = text_no_emoji.strip()
  
      sentitext = SentiText(text)
  
      sentiments = []
      words_and_emoticons = sentitext.words_and_emoticons
      for i, item in enumerate(words_and_emoticons):
          valence = 0
          # check for vader_lexicon words that may be used as modifiers or negations
          if item.lower() in BOOSTER_DICT:
              sentiments.append(valence)
              continue
          if (
              i < len(words_and_emoticons) - 1
              and item.lower() == "kind"
              and words_and_emoticons[i + 1].lower() == "of"
          ):
              sentiments.append(valence)
              continue
  
          sentiments = self.sentiment_valence(
              valence, sentitext, item, i, sentiments
          )
  
      sentiments = self._but_check(words_and_emoticons, sentiments)
  
      valence_dict = self.score_valence(sentiments, text)
  
      return valence_dict
  
imports: import os
  import re
  import math
  import string
  import codecs
  import json
  from itertools import product
  from inspect import getsourcefile
  from io import open
label_desc: Use image node_id 4 for calling the SentimentIntensityAnalyzer obj's underlying member method code with example usage: obj.polarity_scores(text) and returns: valence_dict