Logo Lanfrica
  • Accueil
  • Atlas
  • Analyses
  • Documentation
  • Sign in

© 2026 Lanfrica. Tous droits réservés. Tous les droits d'auteur des ressources affichées sur le site Web Lanfrica appartiennent aux détenteurs de droits d'auteur d'origine, sauf indication contraire explicite.

mahdibenabd/Tunisian_SMS_spam_classifier_API

Domaine:

natural language processing

Type de record:

modelsoftware
Créateur:
mah
Hôte:
This API provides a pre-trained model for classifying SMS messages in Tunisian dialects as spam or ham (not spam). It uses machine learning to automatically detect and filter spam messages from users' SMS inboxes. Tunsian SMS Spam Detection API ====================== This project provides a Python API for classifying SMS messages as spam or ham (not spam). The model has been pre-trained using a dataset of Tunisian SMS messages. If you wish to add your own datasets and retrain the model, follow the instructions below. Table of Contents ----------------- * Prerequisites * Installation * How to Use the API * Retrain the Model * API Endpoints * Contributing * License Prerequisites ------------- * Python 3.x * Virtual environment (recommended) Installation ------------ 1. **Clone the repository:** `git clone github.com` `cd Tunisian_SMS_spam_classifier_API` 2. **Set up the virtual environment:** `python -m venv env` `source env/bin/activate` 3. **Install the required packages:** `pip install -r requirements.txt` How to Use the API ------------------ 1. **Start your Python API server:** `cd predict` `python predict_sms.py` This command will start your Flask API server. 2. **From your Android app, send a POST request to the API to predict if an SMS is spam or not:** `POST 127.0.0.1` `Content-Type: application/json` `{ "sms": "Your SMS content here" }` Replace "Your SMS content here" with the actual SMS text. 3. **Response:** The API will respond with a JSON object containing: `{ "result": "spam" }` Retrain the Model ----------------- To retrain the model with your own datasets, follow these steps: 1. **Prepare your dataset:** Place your dataset CSV files in the `data/` directory. The file should have thre columns: `id ` ,`message` and `label` (e.g., "spam" or "ham"). Example CSV: `id,message,label` `42785,شرجي خطك و ادخل في القرعة فما 25 مليون كاش مجانية.,spam` `42786,ألو وينك؟ نستنى فيك في القهوة,ham` 2. **Retrain the model:** Run the following command to retrain your model: `python retrain_model.py` This script will: - Load your dataset from `datasets/`. - …

Visit

github.com

Tasks

text classification

Languages

Arabic, Tunisian Spoken

Similaires

mahdibenabd/Hate-Speech-Detection-API

mahdibenabd/Hate-Speech-Detection-API

This project implements a machine learning model to classify text as hate speech or non-hate speech