Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Reduce Arabic strings to their rasm, ie remove vocalization and other diacritics.

Project description

Reduce Arabic strings to their rasm, i.e. remove vocalization and other diacritics.


>>> from rasmipy import rasmify
>>> rasmify('الفَاتِحَة')


From the Python Package Index:

$ pip install ramsipy

From the sources:

$ python install

With the optional REST interface:

$ pip install ramsipy[rest-api]


To run a REST service:

$ rasmify-rest-service

Or in a Docker container (with the HTTP port mapped to 8000):

$ docker run –rm -p 8000:80 telota/rasmify

Example GET request:

$ curl http://localhost:8000/?text=ءَاتَيۡنَا

Example POST request:

$ curl -H “Content-Type: text/plain” -d ‘ءَاتَيۡنَا’ -X POST http://localhost:8000/

There are two environment variables that can be used to configure the service:

PORT defines the port that the server listens, defaults to 8000. MAX_GET_PARAMETER_LENGTH defines the allowed maximum length of GET requests, defaults to 1024.



In order to run the tests, you need to install pytest and related packages, preferably in a virtual environment:

$ pip install -r requirements-dev.txt

Install rasmipy in an editable mode:

$ python develop

Before committing changes, you should run the tests:

# in the project's root directory
$ pytest

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for rasmipy, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size rasmipy-0.2.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page