This was a very interesting coding challenge to do: imagining we were AI’s unable to grasp the sentiment of the content we tried to analyse several simple texts with a Sentiment Analysis program Simon built, following a Daniel Shiffman tutorial. It’s based upon the AFINN list, an affective lexicon by Finn Årup Nielsen. Previous and present versions of the word list are available in a zip file on GitHub.
Just like Simon is saying in the last video, some more natural language processing would help and there are libraries that can do it. The AFINN list we relied upon only contains 2477 words, so it only did a good job with very straightforward texts using simple vocab. With a more complicated program we’re pretty sure one can make an AI get some irony though, don’t you think?
The text below was a bit out of AFINN’s league: