NLP - Sentiment Analysis Advanced
Consider this code for domain-specific sentiment:
What is the printed output?
domain_lexicon = {'happy': 2, 'sad': -2, 'neutral': 0}
text = 'I am happy but also sad'
scores = [domain_lexicon[word] for word in text.lower().split() if word in domain_lexicon]
print(sum(scores))What is the printed output?
