Inspiration
While scrolling through twitter and reddit and reading news articles, I often find myself reading a lot of content and realizing later that the user is actually biased and uses speech that cannot be taken in as a reliable source. That is why I created an app that can detect such a thing early on and save people from consuming hateful and biased information. It also helps people who could be triggered or offended by such speech and allows them to quickly analyze what they are getting into and make a judgement.
What it does
The basic functionality of the app is that it allows a user to enter any length of text whether it be as small as a comment or as big as an article, and then the algorithm reads through each word and determines if the bias "score" should be added or decreased. The greater the bias score, the greater the caution.
How we built it
I built this app by creating an HTML webpage with an input box, a scorekeeper, a reset button, and a bar to measure the bias visually. The detailing is done with CSS to keep everything centered and looking clean. When text is entered into the input, it is then sent to the backend using JavaScript and put into a for loop. This for loop then iterates through every word in the bias lexicon I created and adjusts the bias score accordingly, +1 for negative words and -1 for positive words. Then, if the score is changed the bar increases or decreases in height to accurately depict the changes. Finally, the reset button sets everything back to its original state in order for new text to be entered.
Challenges we ran into
I ran into two specific challenges that are not syntax or CSS related. The first challenge being my first idea. I wanted to create a web scraper that takes every new news article from major sites and then scrapes it to check for hate speech or bias. The problem with this was that one, it didn't allow for media such as comments or reddit threads to be used, and two, that it didn't allow for user input. So then I decided to make a web app instead. The second challenge was the bar not increasing in height. I had to calculate a way to detect the height of the bar initially and every time bias was detected, then add the height based on that.
Accomplishments that we're proud of
I am proud of the bias detection algorithm I made as it can be scaled by adding more words or phrases, and it runs smoothly.
What we learned
What I learned was the sheer number of hate speech that exists and it suprised me with how much there was when I was creating the lexicon. I also learned new visual css concepts, as I am more skilled as a backend developer than frontend.
What's next for Bias Detector
I have a lot of plans for this app. In the short term, I would like to increase the number of detectable words and phrases, as it is no where near what it can be. This would allow for a more accurate bias score to be calculated. I could also make it a open source such as a feedback hub where users can add their own experiences with hate speech and then this could be added into the list. Another thing for the long term is to pair the app with natural language processing, or NLP, to create near perfect results. Using machine learning, it is possible to train a model that detects bias in media and when I have mastered it I will definetly be adding it to the app. This would allow the app to be used by major companies.
Log in or sign up for Devpost to join the conversation.