Inspiration

Have you ever had to awkwardly explain to an older friend or relative what words like "lit", "fire", "cringe" and "poggers" mean? I know I have, far too many times. Sling serves as a bridge between the modern day lexicon and those whose heydays are now in the past (or who are just old at heart), allowing them to fully integrate into and embrace internet culture.

What it does

Users are prompted to give a sentence or phrase as input to the website. The interface is intentionally left simple and easy to navigate, to help improve accessibility, especially for those who may not be well versed with the internet or technology. After giving this input, the user submits it and is given an evaluation of the meaning behind the input they gave, highlighting both the subject of the text as well as the general sentiment behind it.

How we built it

Developing the backend of Sling actually required two NLP models both using sentiment analysis. The first was used to develop a training dataset of slang terminology to be used for training the second. This was done by scraping over 60000 words and definitions from Urban Dictionary. The highest ranked definition was then used as the de facto definition upon which to conduct sentiment analysis. The sentiment analysis score of the definition was then used as the sentiment analysis score of the word, thus creating a thorough dataset of slang terminology. A second sentiment analysis model was then trained upon this dataset.

The web application was a little easier to implement. It was built using Flask, HTML, CSS and Javascript. There are several functions written in Python designed to make handling the user input a little easier, and Spacy's en_core_web_sm model was used to identify the subject of a given set of text.

Challenges we ran into

The most significant challenge I ran into developing Sling was the collection of slang data to train the slang model on. While I have used Selenium for web scraping before, navigating through all the different pages to collect as many definitions as possible proved to be a hassle. Also, not all of the words and definitions included on Urban Dictionary are completely appropriate. I tried as best as I could to remove these from the training data to ensure this project is SFW.

Accomplishments that we're proud of

I'm proud of how I was able to develop the slang model. It was a unique challenge to not only collect the data but to also deploy it, so I'm happy I was able to work it out in the end.

What's next for Sling

The models developed for use with Sling currently only work effectively with short, simple phrases. Longer inputs require more and more time to evaluate, hindering the user experience. More research is required to optimize the models to generate quicker outputs. While this is not a mission critical application of machine learning, it is still a net benefit to the user to give these outputs in a quick manner.

Share this project:

Updates