Skip to main content

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

Usage

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

Installation

From the Python Package Index:

$ pip install ramsipy

From the sources:

$ python setup.py install

With the optional REST interface:

$ pip install ramsipy[rest-api]

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.

Resources

Contributing

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 setup.py develop

Before committing changes, you should run the tests:

# in the project's root directory
$ pytest

Download files

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

Source Distribution

rasmipy-0.2.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file rasmipy-0.2.tar.gz.

File metadata

  • Download URL: rasmipy-0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rasmipy-0.2.tar.gz
Algorithm Hash digest
SHA256 144f9d75e90c4284d613cfc5c2ca7ce368742aedc9b18f6d5682aadf9a7c6f82
MD5 46015eca08ffc1fa4469ce437f2d0339
BLAKE2b-256 729a2d3a85e18221a10e5cc70c3dffcb4381a90c2c5a269124b30fc16d4fdc18

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2 This release

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page