Inspiration

For the past few weeks, we have been learning about how to navigate online digital information in our Literature class. We learned how biased sites and texts can often to correlate to misinformation. That's why we created a program to detect bias and hate speech.

What it does

First, 2 language models are trained and tested using a CSV file with a dataset. Then we got input text from our website and put it through the two models to get a bias score and a positivity score.

How we built it

First we downloaded a CSV file full of data & text samples along with bias scores and sentiment scores. Next we preprocessed the data by stemming the words, getting rid of useless words/phrases, and tokenizing everything. Afterwards, we used the model MultinomialNB and trained it with the preprocessed data. For the UI, we used HTML, CSS, and JavaScript to create a nice looking home page and about page. Our home page has 2 "progress bars" that help visualize the bias & positivity score.

Challenges we ran into

We faced many challenges throughout this programming process. However, one of our main challenges was that we would have to retrain the model every time the program is ran. To combat this, we created pickle so that we wouldn't have to run the models more than one time.

Accomplishments that we're proud of

We're proud that we managed to create our own language model and our own UI that is able to work with each other and produce a valid output.

What we learned

We learned how to make a language model and how to make a UI for the website.

What's next for Bias Detection

-Improve the UI -Get a better dataset -Improve the speed of training and outputting

Built With

Share this project:

Updates