https://github.com/jmisilo/offensive-language-classificator
https://github.com/jmisilo/offensive-language-classificator
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jmisilo/offensive-language-classificator
- Owner: jmisilo
- Created: 2022-06-25T14:56:50.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-10T19:34:38.000Z (almost 4 years ago)
- Last Synced: 2025-04-04T10:12:39.111Z (about 1 year ago)
- Language: Python
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Offensive Language Classificator API
The project aims to create a simple API that will allow communication with a fine-tuned model and classifications of the type of tweets/posts - OFFENSIVE or NOT OFFENSIVE. While working on the project, an experiment tracking tool - [W&B](https://wandb.ai/) was used to track performance of the model. Model was trained using a GPU from [Google Colab](https://colab.research.google.com/).
## Results
On the validation set, the model achieved an accuracy of 81.57%, precision of 68.92
% and recall of 74.27%.
## How to run project?
Clone the repository with the command
```
git clone https://github.com/jmisilo/offensive-language-classificator
```
Then go to the directory and install depedencies:
```
cd offensive-language-classificator
pip install -r requirements.txt
```
To run the following command:
```
uvicorn src.app:app --port
```
## API documentation
[Documentation](docs/api_docs.md)
## Data
[Download Data](https://sites.google.com/site/offensevalsharedtask/olid)
[Paper Reference:](https://aclanthology.org/N19-1144.pdf)
Predicting the Type and Target of Offensive Posts in Social Media - Zampieri, Marcos and Malmasi, Shervin and Nakov, Preslav and Rosenthal, Sara and Farra, Noura and Kumar, Ritesh
## Model
[Hugging Face Model Page](https://huggingface.co/siebert/sentiment-roberta-large-english)
[Paper Reference:](https://www.semanticscholar.org/paper/More-than-a-Feeling%3A-Benchmarks-for-Sentiment-Heitmann-Siebert/bfe8c0617ca61496e224380f896c0990fdbf542d)
More than a feeling: Accuracy and Application of Sentiment Analysis - Hartmann, Jochen and Heitmann, Mark and Siebert, Christian and Schamp, Christina