input: Write a function to analyze the sentiment of a given text. The function should tokenize the text, stem each token, remove punctuation, remove stopwords, and then return the polarity score of the text. If the input text is empty, the function should return an empty dictionary.
  def sentiment_analyzer(text):
      if not text:
          return {}
      tokens = word_tokenize(text)
      stemmer = SnowballStemmer('english')
      stemmed_words = [stemmer.stem(word) for word in tokens]
      clean_words = [word for word in stemmed_words if re.match('[a-zA-Z-]+$', word)]
      meaningful_words = [word for word in clean_words if not word in stopwords.words('english')]
      sid = SentimentIntensityAnalyzer()
      polarity_score = sid.polarity_scores(' '.join(meaningful_words))
      return polarity_score
  
  assert sentiment_analyzer("I love this product, it's amazing!")=={'neg': 0.0, 'neu': 0.308, 'pos': 0.692, 'compound': 0.8316}
  assert sentiment_analyzer("I hate this product, it's terrible!")=={'neg': 0.692, 'neu': 0.308, 'pos': 0.0, 'compound': -0.8316}
  assert sentiment_analyzer("This is a neutral statement.")=={'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}
  assert sentiment_analyzer("")=={}
output: def sentiment_analyzer(text):
      if not text:
          return {}
      tokens = word_tokenize(text)
      stemmer = SnowballStemmer('english')
      stemmed_words = [stemmer.stem(word) for word in tokens]
      clean_words = [word for word in stemmed_words if re.match('[a-zA-Z-]+$', word)]
      meaningful_words = [word for word in clean_words if not word in stopwords.words('english')]
      sid = SentimentIntensityAnalyzer()
      polarity_score = sid.polarity_scores(' '.join(meaningful_words))
      return polarity_score