Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Arabic-Tweet-Classification-MARBERT

This repository contains a Jupyter Notebook designed for Arabic text classification using the MARBERT model. MARBERT is a state-of-the-art transformer-based model fine-tuned for tasks involving Arabic natural language processing (NLP).

Dataset

the dataset used to train the model can be obtained from the following link https://www.sciencedirect.com/science/article/pii/S2352340923009472#bib0001. it's collected from Twitter and has two classes Spam and Ham.
I have also added the dataset to this project for ease of use.

Prerequisites

Ensure you have the following dependencies installed before running the notebook:

Python 3.7+
Jupyter Notebook
Hugging Face Transformers
PyTorch
scikit-learn
pandas
numpy
matplotlib

Notes for excution

During the execution of this project, the dataset is accessed from Google Drive, and the trained model is saved back to Google Drive. To ensure the project runs correctly, update the path parameter to match your own Google Drive directory.

For example: path = '/content/drive/MyDrive/Colab/AR/'

Replace '/content/drive/MyDrive/Colab/AR/' with the path where your dataset and model will be stored in your Google Drive.

Model Testing

At the end of training, the classifier is tested by passing two sample tweets:
  • A normal tweet.
  • A spam tweet.
The trained model successfully predicted the classes of both tweets with an accuracy of 99.9%, demonstrating its effectiveness for Arabic text classification.

About

the following notebook is to train MARBERT Model for Arabic tweet classification

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages