input: from typing import Dict
  import re
  from nltk.stem.snowball import SnowballStemmer
  from nltk.tokenize import word_tokenize
  from nltk.corpus import stopwords
  from nltk.sentiment.vader import SentimentIntensityAnalyzer
  
  def sentiment_analyzer(text: str) -> Dict[str, float]:
      """ Analyzes the sentiment of a given text by tokenizing, stemming, removing
      punctuation and stopwords, and then calculating the polarity score.
      >>> sentiment_analyzer("I love this product! It's amazing.")
      {'neg': 0.0, 'neu': 0.295, 'pos': 0.705, 'compound': 0.6114}
      >>> sentiment_analyzer("This is the worst experience ever.")
      {'neg': 0.784, 'neu': 0.216, 'pos': 0.0, 'compound': -0.8271}
      """
output:     stemmer = SnowballStemmer("english")
      stop_words = set(stopwords.words("english"))
      sia = SentimentIntensityAnalyzer()
  
      # Tokenize the text
      tokens = word_tokenize(text)
  
      # Remove punctuation and stopwords, and stem the remaining words
      filtered_tokens = [stemmer.stem(word.lower()) for word in tokens if word.isalnum() and word.lower() not in stop_words]
  
      # Join the filtered tokens back into a single string
      filtered_text = ' '.join(filtered_tokens)
  
      # Calculate the sentiment scores
      sentiment_scores = sia.polarity_scores(filtered_text)
  
      return sentiment_scores