API Documentation v01
API to classify short texts in terms of hate, sexism and racim
Available in english and portuguese
Hate Classification API
-
End Point
http://stop-propaghate-api.inesctec.pt/sph
-
Parameters
- hate_type : ['hate','sexism','racism']
- language : ['en','pt']
- text : String
-
Example Request
curl -X GET http://stop-propaghate-api.inesctec.pt/sph -d 'text=No, the endless Muslim sectarian tension is not appropriate.So stop asking people to pander to it.&hate_type=hate&language=en'
-
Response
[ 0 (False) , 1 (True) ]
News Classification API
API to classify news texts likelihood to generate comments with hate speech.
Available only in english
-
End Point
http://stop-propaghate-api.inesctec.pt/news_api
-
Parameters
- title_news : String
- lead_news : String
- text_news : String
- authors_news : String ( names separeted by comma )
-
source_news : int ( from list )
- ABC News : 0
- BuzzFeed New : 1
- CBS News : 2
- CNN : 3
- CNN Breaking News : 4
- HuffPost : 5
- NBC News : 6
- NPR : 7
- he Boston Globe : 8
- The New York Times : 9
- The Wall Street Journal : 10
- The Washington Post : 11
- USA TODAY : 12
- Yahoo News : 13
- Other Source : 14
-
period_day_news : int ( from list )
- Afternoon : 0
- Evening : 1
- Morning: 2
- Night : 3
- weekday_news
- weekday : 0
- weekend : 1
-
Example Request
curl -X GET http://stop-propaghate-api.inesctec.pt/news_api -d 'title_news="Trump responds to Iranian insults with threat of obliteration"&lead_news="President Donald Trump on Tuesday threatened Iran with great and overwhelming force and potential obliteration in some areas if it attacks anything American after Iranian leaders said the White House is afflicted by mental retardation and they are permanently closing doors to diplomacy in the wake of U.S. sanctions"&authors_news="MERIDITH MCGRAW J, Cassandra Maia, Levi Master, Paul Well"&period_day_news=2&weekday_news=0&text_news="Trump called statements made by Iranian President Hassan Rouhani and"&source_news=0'
-
Response
['Hate', 'No Hate']
# get_the_title($about_page) ?>Why?
It’s important for news organisations to instigate online discussion, but dealing with the immediacy of user feedback is not an easy task – especially when discussion turns offensive. Using PropagHate’s API supported by machine learning techniques, news organisations can automatically identify hate speech within comments, but also predict the likelihood of a news piece to generate such comments in the first place.