Hate speech has long been a problem, but it has grown with the emergence of digital platforms.
Many companies and social networks struggle to detect possible cases of hate speech in different
texts, which is the objective of this API. I have designed and trained a Machine Learning
model capable of detecting whether a sentence contains hate speech.
The dataset with which the predictor has been tested has been successful in 93% of the cases.
Info about the languages that are currently available
[
{
"code": "en",
"language": "english",
"status": "active"
},
{
"code": "es",
"language": "español",
"status": "disabled"
}
]
Endpoint to predict a maximum of 10 english quotes at a time
{
data: [
"quote to be predicted 1",
"quote to be predicted 2",
" ... ",
]
}
{
# array with the predicted probability of each quoteprob: []
# array with the predicted category in texttext: []
# array with the predicted category in numbersvalues: []
}
Currently no available
import requests
import json
response = requests.get('https://hatespeech.pauescofet.com/languages')
print(response.status_code)
# out: 200
res_json = json.loads(response.text)
print(res_json)
# out:
data = {
'data': [
"I think you are cool",
"I am going to kill you",
"You are a bitch",
"I hate you",
"Maybe we could go for a drink some day"
]
}
response = requests.post(url = 'https://hatespeech.pauescofet.com/hatespeech/en', json = data)
print(response.status_code)
# out: 200
res_json = json.loads(response.text)
print(res_json)
# out: