How to predict the sentiment of the entities form the tweet?
I have a JSON file (tweets.json) that contains tweets (sentences) along with the name of the author.
Objective 1: Get the most frequent entities from the tweets. Objective 2: Find out the sentiment/polarity of each author towards each of the entities.
Sample Input:
Assume we have only 3 tweets:
Tweet1 by Author1: Pink Pearl Apples are tasty but Empire Apples are not.
Tweet2 by Author2: Empire Apples are very tasty.
Tweet3 by Author3: Pink Pearl Apples are not tasty.
Sample output: Entities in the topics extracted: Share a dictionary with extracted entities as keys and the number of tweets an entity has mentioned as values.
Example dictionary for the above example: {“Pink Pearl Apples” : 2,
“Empire Apples” : 2}
Now, objective 2 -
Now using Count Vectorizer I have completed objective 1, now how to get the sentiment based on the entities(Objective 2)
Thanks in Advance!!!
Topic spacy stanford-nlp sentiment-analysis language-model nlp
Category Data Science