User enters text and script returns sentiment analysis using NLTK
1
#import wmill
2
import nltk
3
from nltk.sentiment import SentimentIntensityAnalyzer
4
nltk.download("vader_lexicon")
5
6
def main(text: str = "Wow, NLTK is really powerful!"):
7
return SentimentIntensityAnalyzer().polarity_scores(text)