Hate Speech Analyser for en,pt,es and it
986
API for sentiment analysis, hate speech detection, emotion analysis, and translation using PyTorch models.
curl http://localhost:8000/health
curl -X POST http://localhost:8000/translate \
-H "Content-Type: application/json" \
-d '{"input": "Hello world", "target_lang": "pt"}'
curl -X POST http://localhost:8000/analyze \
-H "Content-Type: application/json" \
-d '{"input": "This is amazing!"}'
With fallback language:
curl -X POST http://localhost:8000/analyze \
-H "Content-Type: application/json" \
-d '{"input": "Bonjour!", "dfl_ln": "en"}'
Returns a simple HTML page with "Speech Analyser" title.
Analyzes text sentiment, hate speech, emotion, and irony.
Request Body:
{
"input": "your text here"
}
Response:
{
"success": true,
"detected_language": "pt",
"original_text": "seu texto aqui",
"sentiment": {
"output": "POS",
"probas": { "POS": 0.9, "NEU": 0.05, "NEG": 0.05 }
},
"hate_speech": {
"output": "hateful",
"probas": { "hateful": 0.1, "targeted": 0.05, "aggressive": 0.05 }
},
"emotion": {
"output": "joy",
"probas": { "joy": 0.8, "sadness": 0.1, "anger": 0.05, "fear": 0.05 }
},
"irony": {
"output": "non-ironic",
"probas": { "ironic": 0.1, "non-ironic": 0.9 }
}
}
Translates text to the specified language.
Request Body:
{
"input": "Hello world",
"ln": "pt"
}
Supported languages: en, pt, es, fr, it
Response:
{
"success": true,
"detected_language": "en",
"target_language": "pt",
"original_text": "Hello world",
"translated_text": "Olá mundo"
}
Content type
Image
Digest
sha256:de6433842…
Size
4.2 GB
Last updated
10 months ago
docker pull tiag0ss/speechanalyser-app