User enters text and script returns sentiment analysis using NLTK
1
// import * as wmill from 'windmill-client'
2
3
export async function main(x: string) {
4
return x
5
}
#import wmill
import nltk
from nltk.sentiment import SentimentIntensityAnalyzer
nltk.download("vader_lexicon")
6
def main(text: str = "Wow, NLTK is really powerful!"):
7
return SentimentIntensityAnalyzer().polarity_scores(text)