There have been many interesting news stories popping up recently about artificial intelligence (AI) being trained to identify human emotions. Like so much else to do with humans, reading emotions is a nuanced, complicated endeavour, particularly for machines. But the benefits of having technology that can do this are immense — far beyond just creating more effective chatbots. For some researchers, having an AI tool with the ability to recognize emotional well-being could save lives.
It was with this goal that Hamman Samuel, a Computing Science Master’s grad from the University of Alberta (UofA), set out to develop an AI-based tool that identifies and maps the emotional context of Canadian tweets.
Grebe is an open platform that aggregates and assesses social messages, and identifies where they are coming from, to create a mental well-being map of Canada. Built and operated on Cybera’s Rapid Access Cloud by a team of UofA computing scientists, Grebe currently looks at Twitter data from six Canadian provinces. Hamman hopes to eventually roll out a platform that covers multiple social media platforms, across the entire country.
“We wanted to look at how people express wellness on Twitter. This involved running a sentiment analysis of the language used in tweets to determine if they were sad, happy, angry, and so on,” says Hamman, who began the Grebe project in 2016.
“We also wanted to geolocate the tweets, which is very important for health assessors, so they can know what areas they may need to focus more on. It was also important for us to develop a Canada-specific platform, because so much of the current social sentiment research comes out of the USA or Japan, which makes it mostly unusable for Canadian analysis.”
Because Grebe is open-source and based on publicly available social media data, the team had to find an effective way to “geofence” tweets. Their solution was to focus on messages from users who had enabled their location finder, or ones that mentioned a specific location. This required building a complex filtering mechanism that could group tweets according to location and sentiment, and also comply with privacy regulations (which meant discarding tweets from minors).
Laptop vs Cloud
The idea for Grebe came from a similar project started by a health student at the UofA who was assessing the well-being of young people online. The student had developed an algorithm to review Twitter which ran on her laptop, meaning it only worked when her laptop was on. Hamman helped her develop a cloud-based solution that could run continuously. But this led to the bigger challenge of how to assess the emotional state of all adult Canadians online, and pinpoint what regions were experiencing more intense emotions.
This new, broader platform was built and continues to operate on the Alberta-based Rapid Access Cloud.
“Using the Rapid Access cloud has been very advantageous for us, not only because it’s free, but also because it was very easy to set up and just let run,” says Hamman.
“After three years of development, we now have a publicly available, open source tool that other researchers can use to get a better understanding of Canadians’ health needs.”
Supporting global wellbeing analysis
One such external assessment project came from a City of Edmonton hackathon. Participants were asked to use Grebe to focus on social messages about city spaces and parks, to see how urban design affects mental health. The resulting information was fed to urban planners, to help them make adjustments to city spaces that would enhance residents’ well-being.
Hamman says he’s also had international researchers reach out to him to utilize his platform.
“One Brazilian researcher modified our platform to look at public sentiment during the recent Brazilian election. Another is using the sentiment analysis aspect to look at people with a specific mental illness.”
Hamman is currently completing a Computing Science PhD at the University of Waterloo, but hopes to continue updating the Grebe tool to make it more accessible, and include more analysis and visualization capabilities.
He says Grebe is free to use by any researcher (for non-commercial purposes), and invites them to email him for more details.