Skip to main content

example workflow example workflow PyPI version License Downloads

Arabic Natural Language Toolkit (ANLTK)

ANLTK is a set of Arabic natural language processing tools. developed with focus on simplicity and performance.

ANLTK is a C++ library, with python bindings

Installation

for python :

pip install anltk

Building

Note: Currently only tested on Linux, prebuilt python wheels are available for Linux, Windows, Macos on pypi

Dependencies

  • utfcpp, automatically downloaded.
  • utf8proc, automatically downloaded.
  • C++ Compiler that supports c++17.
  • Python3, meson, ninja
  • Task (optional, for simplified build commands)

Building C++ Library

git clone https://github.com/Abdullah-AlAttar/anltk.git
cd anltk/

# Using taskfile (recommended)
task configure
task build
task test

# Or manually with meson
meson build --buildtype=release -Dbuild_tests=false
cd build
ninja

Building Python Bindings

# Complete setup (creates venv, installs deps, builds package)
task py:setup

# Or step by step:
task py:venv              # Create virtual environment
task py:deps              # Install build dependencies
task py:install           # Install in development mode

# Test the installation
task py:test              # Run quick tests

# Build wheel for distribution
task py:wheel             # Build wheel package

# Clean build artifacts
task clean                # Clean all build artifacts

Manual Python Build (without taskfile)

python3 -m venv .venv
.venv/bin/pip install --upgrade pip meson-python build pybind11 ninja patchelf
.venv/bin/pip install -e .

Usage Examples

C++ API

#include "anltk/anltk.hpp"
#include <iostream>
#include <string>

int main()
{

    std::string ar_text = "أبجد هوز حطي كلمن سعفص قرشت ثخذ ضظغ";

    std::cout << anltk::transliterate(ar_text, anltk::CharMapping::AR2BW) << '\n';
    // >bjd hwz HTy klmn sEfS qr$t vx* DZg

    std::string text = "فَرَاشَةٌ مُلَوَّنَةٌ تَطِيْرُ في البُسْتَانِ، حُلْوَةٌ مُهَنْدَمَةٌ تُدْهِشُ الإِنْسَانَ.";

    std::cout << anltk::remove_tashkeel(text) << '\n';
    // فراشة ملونة تطير في البستان، حلوة مهندمة تدهش الإنسان.

    // Third paramters is a stop_list, charactres in this list won't be removed
    std::cout << anltk::remove_non_alpha(text, " ") << '\n';
    // فراشة ملونة تطير في البستان حلوة مهندمة تدهش الإنسان

    anltk::TafqitOptions opts;
    std::cout<< anltk::tafqit(15000120, opts) <<'\n';
    // خمسة عشر مليونًا ومائة وعشرون
}

Python API

import anltk


ar = "أبجد هوز حطي كلمن سعفص قرشت ثخذ ضظغ"
bw = anltk.transliterate(ar, anltk.AR2BW)
print(bw)
# >bjd hwz HTy klmn sEfS qr$t vx* DZg

print(anltk.remove_tashkeel("فَرَاشَةٌ مُلَوَّنَةٌ تَطِيْرُ في البُسْتَانِ، حُلْوَةٌ مُهَنْدَمَةٌ تُدْهِشُ الإِنْسَانَ."))

# فراشة ملونة تطير في البستان، حلوة مهندمة تدهش الإنسان.

print(anltk.tafqit(15000120))
# خمسة عشر مليونًا ومائة وعشرون

For list of features see Features.md

Benchmarks

Processing a file containing 500000 Line, 6787731 Word, 112704541 Character. the task is to remove diacritics / transliterate to buckwalter

Buckwatler transliteration

Method Time
anltk python-api 1.379 seconds
python camel_tools 11.46 seconds

Remove Diacritics

Method Time
anltk python-api 0.989 seconds
python camel_tools 4.892 seconds

Metadata

Release files for anltk 1.0.8

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

Built distributions (wheels)

Table of built distributions (wheels) for anltk 1.0.8
File
anltk-1.0.8-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
anltk-1.0.8-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
anltk-1.0.8-cp314-cp314-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.15+ x86-64 Details
anltk-1.0.8-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
anltk-1.0.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
anltk-1.0.8-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
anltk-1.0.8-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
anltk-1.0.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
anltk-1.0.8-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
anltk-1.0.8-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
anltk-1.0.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
anltk-1.0.8-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
anltk-1.0.8-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
anltk-1.0.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
anltk-1.0.8-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
anltk-1.0.8-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
anltk-1.0.8-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
anltk-1.0.8-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details
anltk-1.0.8-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
anltk-1.0.8-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
anltk-1.0.8-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details

Total release size: 12.1 MB

Release files / anltk-1.0.8-cp314-cp314-win_amd64.whl

Download URL anltk-1.0.8-cp314-cp314-win_amd64.whl
Size 1.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
661563b6096fd085afbed55fca86a6562479c3f56e3deb2bbd8e4a08c602ab49
BLAKE2b-256 checksum
How to use checksums
ab718953baebb8a03a334a6b36e0bb8f24c8befeacadcfb1d6f92770b410da87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL anltk-1.0.8-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 277.0 kB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a919b1b4ef0815b04c01e9f85631d6d52091c923c215810be2734529b614701f
BLAKE2b-256 checksum
How to use checksums
cf92960f7ab0575fc206e384fc5c48d5a60d8c78c76c3f1137f9c6d43f67060d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp314-cp314-macosx_10_15_x86_64.whl

Download URL anltk-1.0.8-cp314-cp314-macosx_10_15_x86_64.whl
Size 256.7 kB
Tags CPython 3.14 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
55072bd48f9e4230e246d80c46b5768bd28e4c611ea7823a2f937a8d8e27d956
BLAKE2b-256 checksum
How to use checksums
01743521736f6ae38bb7e1309c1046a917148f2d364fcac9fa315b95d721d4a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp313-cp313-win_amd64.whl

Download URL anltk-1.0.8-cp313-cp313-win_amd64.whl
Size 1.2 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4c7e5f68ba5ad2bb1e99e63c6506faf2145ed52f2296d7a26d859daab633ee55
BLAKE2b-256 checksum
How to use checksums
99d0ae3bbb5fdfaa3a2149b92409b151496c4e46803d92cfb6ea0c28c39654e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL anltk-1.0.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 276.5 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c8885a2348b18bb8cfa834d6b77f054ebb9d9a771ea7393793d950b8d3a6e35c
BLAKE2b-256 checksum
How to use checksums
b3fe6ada7265c094d85d1779c17e8fb389bac30f989c4992e217397833975b9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp313-cp313-macosx_10_13_x86_64.whl

Download URL anltk-1.0.8-cp313-cp313-macosx_10_13_x86_64.whl
Size 257.8 kB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
29a7d69305c2252a2442e644a85e212e0aa21326a81b50ec4c8d374f65ca6fc2
BLAKE2b-256 checksum
How to use checksums
6895f4b2b72599f4d5f8c76ca3713b39334804091d704d5d87dc51fd69a35888
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp312-cp312-win_amd64.whl

Download URL anltk-1.0.8-cp312-cp312-win_amd64.whl
Size 1.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f02fb704956a70dcfac9cb2ed23fa0569c0e4db163e5c2b86e78ee427dfd3b75
BLAKE2b-256 checksum
How to use checksums
cb888489baf35a6474ea4755927b0633432f26cb7fe779ba07f4607fb36426c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL anltk-1.0.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 277.0 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6ebf6b45d8c435c91cf4d9c3851e89cf2c14827d14a72e58fca4a1cecb4284c5
BLAKE2b-256 checksum
How to use checksums
8af8c4a66ea8d38df96d0aa0ca9d71982079bcddcb0b9fa3bdd88190f6f6a6a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp312-cp312-macosx_10_13_x86_64.whl

Download URL anltk-1.0.8-cp312-cp312-macosx_10_13_x86_64.whl
Size 257.8 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
39743e8cff0823d856fcb9b5255fa0dcffed9c4eff91e507bc63fd16dc5a0050
BLAKE2b-256 checksum
How to use checksums
3f9e01c9f3b6e6dd204c1d8d4815c591599badc0a82a606f3b725f3647e54bb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp311-cp311-win_amd64.whl

Download URL anltk-1.0.8-cp311-cp311-win_amd64.whl
Size 1.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
0bf05c32fda9b8ef72fecec6de483e34eab934f593792601a4813fc759c5a0f8
BLAKE2b-256 checksum
How to use checksums
5599600db229ce16cc99e090b6c575ccd80617985921e7bad427b5bacd1d6b07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL anltk-1.0.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 275.6 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8385adfe365cdfd53b4808b9743a85ecbff56fdf614e52231b77d3ea3ff6b57c
BLAKE2b-256 checksum
How to use checksums
5adea744df5556caafcfd0079b2dfe02fbff0d109188d7e9c0762e8134bc3916
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp311-cp311-macosx_10_9_x86_64.whl

Download URL anltk-1.0.8-cp311-cp311-macosx_10_9_x86_64.whl
Size 252.9 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
6ed7ebb4c9b86251be69e58e3f2f35e27477ac6a8d5ba58f06e023ca2124f645
BLAKE2b-256 checksum
How to use checksums
31ba3622e06617ff80df288880c689bb0dd8b59c70e514fcd736201313cf2865
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp310-cp310-win_amd64.whl

Download URL anltk-1.0.8-cp310-cp310-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
be502b1db75d96817572891bdde663ed6e26dafee9e77b5658b1a6deae46f6ba
BLAKE2b-256 checksum
How to use checksums
e2f2c90c7fd8b1b6b25a9f9b7195cf3d0da11c590c0ba8e0608c604a97c9d8b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL anltk-1.0.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 274.1 kB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5f6d6caa92ea8d2062719d13b2f515bef169b8f6a706fc38c47d00a42195a6a3
BLAKE2b-256 checksum
How to use checksums
3ef782f0032f63e7c2d76a89cd62933ed2c418db35e73e596ac2fe83a82a5d03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp310-cp310-macosx_10_9_x86_64.whl

Download URL anltk-1.0.8-cp310-cp310-macosx_10_9_x86_64.whl
Size 251.3 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
b1b2c7b01da6d6244a9fde5bb5642aadd454a3e0510d8a9bd03482af85fd379f
BLAKE2b-256 checksum
How to use checksums
6b1b63c6363a8937c0146349589d71e5c2344b8d81d97612f22625049835ef76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp39-cp39-win_amd64.whl

Download URL anltk-1.0.8-cp39-cp39-win_amd64.whl
Size 1.2 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
db715c27aa99d190f9457f4f3dac89a439f97751e90936de1b5b30fcf6a94c1d
BLAKE2b-256 checksum
How to use checksums
7a4676908bce51a63ec8318cdd1cc3537237dde3e4c5eabb9bab89ca5b751d0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL anltk-1.0.8-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 274.2 kB
Tags CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7087a0847fc77c2db8cea95f93fb72b245da7fb2caf4257dd271ae27d93c187e
BLAKE2b-256 checksum
How to use checksums
4689ed747557ca08b8ad9b9ac4e1e09d5f7c8804829b061882e14e3f33c5d844
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp39-cp39-macosx_10_9_x86_64.whl

Download URL anltk-1.0.8-cp39-cp39-macosx_10_9_x86_64.whl
Size 251.5 kB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
570bd76078c6c059eb52be3f76864982d2baabfbed0ac030a7c1ccfdef160eac
BLAKE2b-256 checksum
How to use checksums
965b8349019a7687d2ec3e7f0cebb8f4b82fd8235c33f077c282dbd974796e22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp38-cp38-win_amd64.whl

Download URL anltk-1.0.8-cp38-cp38-win_amd64.whl
Size 1.2 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
cc2557ca82ae0792c5949ebb4c0bb6b3ce0de1951f1e089654fd44bffc09d830
BLAKE2b-256 checksum
How to use checksums
078c814929096092ca44559de998b31f006936cb0fc6a51da8a6cd4b663ace47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL anltk-1.0.8-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 274.9 kB
Tags CPython 3.8 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
36929c2637f938a81285d790bba901a62ff469b1eca61cd31a527b91a5c62329
BLAKE2b-256 checksum
How to use checksums
ae509f3822c82d9e4e1ef7ffb523c5178e662013d833eaa734e3be2e8e352abb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / anltk-1.0.8-cp38-cp38-macosx_10_9_x86_64.whl

Download URL anltk-1.0.8-cp38-cp38-macosx_10_9_x86_64.whl
Size 251.7 kB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
9576300c09487572618855c95cef981d38a3f489cd9e10c5ba636b92f37f902c
BLAKE2b-256 checksum
How to use checksums
57455c52b8d3a0025ccfea70540ff84dbd671e1c94b027331203908f8a140417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for anltk 1.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.8 This release

21 release files No provenance

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