In order to get insightful information we'll calculate the sentiment for the most frequent entities related to football clubs. We take the three most mentioned clubs and check the mean sentiment for each of them using the np.mean()
function from numpy as follows:
subset = dataset[dataset['tweet'].str.contains('Liverpool')] avg_sentiment = np.mean(subset['sentiment'])
We obtain the following results illustrated by some random verbatim:
Liverpool 0.1166: Milner focused on Liverpool results #SSFootball via @SuperSportTV https://t.co/CIthkFY5Qs. Juninho says he is delighted Liverpool forward Philippe Coutinho replaced him as the top-scoring Brazilian in the Premier League. African striker on his love for Liverpool. https://t.co/Mfk6wXWwhf
Similarly, applying the other two keywords we get the following results:
- Chelsea 0.2121: Melo melo@ChelseaFansUSA: Zouma: One of the best memories I have from my time at Chelsea so far was my first goal in the Premier League...