Inspiration
Hate speech and fake news has become prominent across the globe and there are very few activists and people who work on tackling it and taking action. Expert.ai's simple API makes it so much easier to find hatred and various aspects of online hate easier to detect like below:
1000 Personal Insult
2000 Discrimination and Harassment
2100 Racism
2200 Sexism
2300 Ableism
2400 Religious Hatred
2500 Homophobia
2600 Classism
2700 Body Shaming
3000 Threat and Violence
What it does
This simple prototype was built in a couple of hours as I discovered the hackathon at the very end just before the deadline. The idea is to be able to give a news article to the the 'Detect Hate Speech' API from expert.ai to find insights from the article's content.
For the prototype:
- I am pulling the first article from a specific topic (Politics as shown in the demo)
- Scraping the content from the link using JSDOM and Readability packages
- Sending the content to https://nlapi.expert.ai/v2/detect/hate-speech/en to get some insights.
How we built it
Stack: Node.js + Express + EJS + Expert.AI
APIs: Fetching a random article using the NEWS API (GET https://newsapi.org/v2/everything?q=bitcoin&apiKey=API_KEY) & Hate Speech Detector API (https://docs.expert.ai/nlapi/latest/guide/detection/hate-speech/)
Challenges we ran into
I discovered the hackathon very late but the API was super simple!
Accomplishments that we're proud of
Being able to put out a basic app in a very very short time
What's next for News Hate Detector
- Better UI and users should be able to input a news article to gain insights
- Showing the content in a better form highlighting the words returned from the API for the triggers identified
- Accounts and storage system for caching already tracked articles to not make multiple wasteful API requests
- Get initial feedback from the team and improve on the MVP and take it to actual users
Log in or sign up for Devpost to join the conversation.