This API serves as the backend for the detoX browser extension designed to address hate speech detection with a particular focus on election-related and politics-related content in the Philippines. It employs a fine-tuned RoBERTA Tagalog Base model, a variant of the BERT (Bidirectional Encoder Representations from Transformers) model known for its exceptional performance in NLP tasks.
The model was trained using a combined dataset from two sources. The first dataset was a pre-labeled Filipino hate speech dataset. The second dataset consisted of newly crawled 2022 Philippine Presidential Elections-related Tweets.
- Hate Speech Filipino: hate_speech_filipino
- Combined Dataset: mapsoriano/2016_2022_hate_speech_filipino
- RoBERTA Tagalog Base Model: jcblaise/roberta-tagalog-base
- Fine-tuned Model: mapsoriano/roberta-tagalog-base-philippine-elections-2016-2022-hate-speech
- Development repo: alliyah95/detoX
- Live: detoX
-
Download or clone the repository to your local machine using the following command:
git clone https://github.com/alliyah95/detoX-api.git
-
Navigate to the project directory:
cd detoX-api
-
Install the project dependencies:
pip install -r requirements.txt
-
Run the app by executing the following command:
uvicorn main:app --reload
-
To test the API endpoints with a GUI, navigate to the following URL in your browser. The default port is
8000
.http://127.0.0.1:<PORT>/docs#/
-
Used for checking whether the server is running.
{ "1": "Server is up and running" }
-
Returns the result of the hate speech detection.
?content
- the text content used for hate speech classification./api/v1/detect?content=hahaha%20basta%20pulangaw%20bobo
{ "result": 1 }
Name | Contribution |
---|---|
🌟 Dr. Mary Jane Rabena | Our Thesis Adviser |
🌟 Dr. Arlan Dela Cruz | Our Thesis Co-Adviser |
🌟 Ms. Abijah Louise Dela Cruz | Dataset Validator |
🌟 Dr. Alma Theresa Manaloto | Expert Evaluator |
🌟 Dr. Ocirne Jun-Jun Liwanag | Expert Evaluator |
🌟 Mr. Arvin del Rosario | Expert Evaluator |
🌟 Mr. John Montes | Expert Evaluator |
🌟 Mr. Nelson Dizon | Expert Evaluator |
🌟 Mr. Alberto Castro Jr. | Expert Evaluator |
🌟 Mr. Blaise Cruz | Publisher of the RoBERTa Tagalog Base model and the Hate Speech Filipino Dataset |
- 👧 Danica L. Castro
- 👧 Lenina Jemima V. Dizon
- 👧 Alliyah Joyce M. Sarip
- 👦 Mark Aaron P. Soriano