Inspiration 💡💡💡
Simple Sentiments was inspired by my interest in conversational AI combined with explorations in language and thought, along with the spirit of play.
What it does 🪄👁️🗨️
Simple Sentiments is an Amazon Alexa skill that uses Symbl.ai sentiment analysis to measure sentiment in the user's utterance. Rather than just providing raw measurements, Simple Sentiments challenges the user to match target measurements for positive, negative, and neutral measurements, with higher scores awarded for proximity to the targets.
How we built it 🧠👀
Simple Sentiments was built as an Alexa voice interaction model (a set of JSON files) with an AWS Lambda back end written in Node.js. The back-end code makes calls to the Symbl.ai sentiment analysis API. This skill was adapted from a previously published Alexa Skill, "Sentiment Match", which was based on the Amazon Comprehend sentiment analysis API. The adaptation to use Symbl.ai was done entirely within the hackathon period.
Challenges we ran into 🏃🏃
Because the Symbl.ai authentication token expires, and given the transitory nature of Lambda functions, the skill needs to request the token each time before calling the Messages API using the token. It would be possible to persist the token and only request it upon failure of an expired token, but that'll wait until a later version. Adapting the skill from Comprehend's sentiment measurement as a vector that mixes four components (positive, negative, neutral, mixed) to Symbl.ai's scalar measurement along a single negative-neutral-positive axis required me to adjust both gameplay and scoring to maintain a good level of engagement and relevance.
Accomplishments that we're proud of 🎖️🎖️
The adaptation of existing code from Comprehend to Symbl.ai was straightforward, establishing that the framework I created was (for the most part) modular and portable to other measurement systems.
What we learned 🙇♂️🙇♂️🙇♂️
The adaptation showed that the general idea of a target-based interactive challenge around linguistic measurements, beyond just a one-way measurement of user input, is possible and transferrable to alternative back-end measurement systems
What's next for Symbol.AI Simple sentiments 🙇♂️💡💡
I will revisit parts of my code that weren't as modular (i.e. dependent on the measurement platform), to see if I can provide more of a separation. I will also look at using the target-challenge interactivity of Simple Sentiments to create other interactive experiences that challenge the user to meet other targets.
Built With
- amazon-alexa
- api
- api-translation
- app
- css3
- html5
- node.js
Log in or sign up for Devpost to join the conversation.