Skip to main content

Arabic NLP Toolkit

A complete, production-ready Python package for processing Arabic text following MLOps best practices. Designed for use in machine learning pipelines, it includes utilities for cleaning, normalization, tokenization, and basic sentiment analysis.

Features

  • Text Cleaning: Strip diacritics, remove special characters, and normalize Arabic text.
  • Tokenization: Simple and rule-based tokenizers and sentence splitters tailored for Arabic text.
  • Sentiment Analysis: Basic rule-based sentiment scoring (positive, negative, neutral).
  • MLOps Ready: Designed with modularity, testing, and continuous integration in mind.

Installation

From Source

Ensure you have Python 3.8+ installed. You can install it directly by cloning the repository and running:

git clone https://github.com/Melad98/MLOps-package-structure.git
cd MLOps-package-structure
pip install .

For development (including dependencies for testing and building):

pip install -e ".[dev]"

Usage Example

from arabic_nlp_toolkit.cleaning import normalize_arabic

text = normalize_arabic("النّص العَرَبِيُّ!")
print(text)
# Output might be "النص العربي!" depending on the normalization functions

Testing

To run the unit tests, install development requirements and use pytest:

pip install -e ".[dev]"
pytest tests/

Packaging

Ensure your package is buildable using build:

python -m build

Metadata

Release files for arabic-nlp-toolkit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arabic-nlp-toolkit 0.1.0
File Size Uploaded
arabic_nlp_toolkit-0.1.0.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arabic-nlp-toolkit 0.1.0
File Interpreter ABI Platform
arabic_nlp_toolkit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / arabic_nlp_toolkit-0.1.0.tar.gz

Download URL arabic_nlp_toolkit-0.1.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2f59dbe6b18057ee04a3d16f7d4a8a6d95a372b81cd7ff2808a060968af5fd44
BLAKE2b-256 checksum
How to use checksums
68aadcdcc3d043604c6f21bb8fcce8c789eb1b1665fff1e47aa07ae36ee6e175
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release files / arabic_nlp_toolkit-0.1.0-py3-none-any.whl

Download URL arabic_nlp_toolkit-0.1.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
904a88272300b6c6edfaa9afbb819e46b2fc3baf98c6c94d4eaada2bf8f362a7
BLAKE2b-256 checksum
How to use checksums
48515f8aaa024a60cb8415306e0fc028520344ade82247867dda8eab8c939593
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page