Skip to content

Arabic offensive speach detector with Arabic BERT and Pytorch

Notifications You must be signed in to change notification settings

Strifee/offensive_Arabic

Repository files navigation

offensive arabic

an Arabic offensive speach detector by fine tuning on pre-trained AraBERT

Setup and Requirements

1. CUDA:
install CUDA before installing the required packages or check if it is already installed

2. Clone the Translate repo:

https://github.com/Strifee/offensive_Arabic.git

3. install requirements:

pip install -r requirements.txt

if you have problem with CUDA package try this:

conda install -q pytorch torchvision cudatoolkit=11 -c pytorch-nightly

2. Training

$ python train.py

4. Testing

$ python test.py

Fine Tuning

batch_size = 32
lr = 0.0001
epochs = 4

Results

AUC: 0.8596
Accuracy: 83.45%

image

About

Arabic offensive speach detector with Arabic BERT and Pytorch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published