Sentiment score

Report a typo

Have a look at the code below. It computes the sentiment score of your sentence. Unfortunately, one line contains errors, so you can't get a result. Find the line with errors and print the correct version of it.

import stanza


stanza.download("en")
nlp = stanza.Pipeline(lang="en", processors="tokenize, sentiment")
doc = 'I do not like that film.'
for sentence in doc.sentences:
    print(sentence.sentiment)
Enter a short text
___

Create a free account to access the full topic