Emotion from the text (sadness , joy , fear , anger ) python Example

شارك هذه المقالة مع أصدقائك!

under editing

download the sample date:

Date and time: Sat Feb 22 04:14:23 +0000 2020

text: RT What a coincidence that Russia always happens to support whoever the Democrat party elites are trying to destroy at any given…

sadness: 0.15790210664272308

joy :0.20329616963863373

fear: 0.47116225957870483

anger: 0.2204379141330719

from nltk.tokenize import word_tokenize
import pandas as pd  
import matplotlib.pyplot as plt

I used Trump tweets :

‫0 تعليق

اترك تعليقاً