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).
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.
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
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.
At the end of training, the classifier is tested by passing two sample tweets:
- A normal tweet.
- A spam tweet.