Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/meyt/neviseh

Simple text processing tools in persian
https://github.com/meyt/neviseh

Last synced: about 1 month ago
JSON representation

Simple text processing tools in persian

Awesome Lists containing this project

README

        

Neviseh
=======

.. image:: https://travis-ci.org/meyt/neviseh.svg?branch=master
:target: https://travis-ci.org/meyt/neviseh

.. image:: https://coveralls.io/repos/github/meyt/neviseh/badge.svg?branch=master
:target: https://coveralls.io/github/meyt/neviseh?branch=master

Simple text processing tools in persian.

Features
--------

- Text normalization
- Keyboard layout mapping translation
- Calendar translation

Usage
-----

Currently we have two base modules for English and Persian texts,
each of these modules contains chaining-methods that apply on
initial value.

Example:

.. code:: python

from neviseh import PersianText
print(str(
PersianText('123').translate_latin_numbers()
))
# output: ۱۲۳

print(str(
PersianText('123.45').replace_decimal_dots().translate_latin_numbers()
))
# output: ۱۲۳٫۴۵

for complete samples look tests.

TODO:
-----

- Affix spacing (`more `__)
- Calendar month names translation

.. - Normalize nowadays style using on social networks (like: خـٍـٍـٍـٍـٍْـٍْـٍْـٍْـٍْـٍـٍـٍـٍـٍورشیـב) (`more `__)

Related projects
----------------

- `Hazm `__
- `persian.js `__
- `persianize.js `__