NLP - Sentiment Analysis Advanced
Consider this Python code:
What will be the output of this code?
domain_lexicon = {'excellent': 2, 'poor': -2, 'average': 0}
text = 'The service was excellent but the food was poor'
score = sum(domain_lexicon.get(word, 0) for word in text.lower().split())
print(score)What will be the output of this code?
