Skip to main content

Improved display of Farsi text

Project description

facleaning

Improved display of persian text

Download

Installation through pypi.

pip install facleaning --user

You can also install from this repository.

git clone https://github.com/goldaaa/facleaning.git

Then, install the library with

python setup.py install

Importing

Import kivyir commands, menus, and the shell

from facleaning import cleaning
from facleaning.LanguageCheck import reverse_parse, find_text, fa, en

Commands

Commands that can be used

from facleaning.LanguageCheck import reverse_parse, find_text, fa, en

text = 'این متن توسط goldaaa برای تست نوشته شده است'

reverse_parse(text, search='fa')  # جستجوی کلمه های فارسی برای تغییر جهت کلمه

reverse_parse(text, search='en')  # جستجوی کلمه های انگلیسی برای تغییر جهت کلمه


# Search for other items requested via regex to change the direction of the word 
# جستجوی سایر موارد خواسته شده از طریق regex برای تغییر جهت کلمه
reverse_parse(
    text=text,
    search=lambda word: find_text(word, "[A-Z a-z 1-9 ۱-۹]"),
    reverse_text=True
)

test_fa = (
    'lang fa word (تست): ', fa('تست'),
    '| lang fa word (goldaaa): ', fa('goldaaa')
)
test_en = (
    'lang en word (تست): ', en('تست'),
    '| lang en word (goldaaa): ', en('goldaaa')
)


from facleaning import cleaning
cleaning(
    text=text,
    lang='fa',                  # language fa or ar
    reverse_text=False,         # Change the direction of the entire text | تغییر جهت کل متن
    reverse_other_char=True,    # Change direction of signs | تغییر جهت علامت ها
)

If you are interested in financial support, you can send a message through Gmail if you have any questions.

اگر قصد حمایت مالی یا سوال دارید می توانید از طریق جیمیل پیام ارسال کنید.

gmail: goldaaa.program@gmail.com

github facleaning

Project details


Download files

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

Source Distribution

facleaning-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

facleaning-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

facleaning-0.1.0-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file facleaning-0.1.0.tar.gz.

File metadata

  • Download URL: facleaning-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for facleaning-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0272c3f9a3c1f4155ed8d83d269c467bb192dec645fc0eb71e00fec96ff49bfd
MD5 130637bce612cd902109ed48a4806c54
BLAKE2b-256 fae43a1db1dfadf507b5e5eead949bc70b32755eb14e04774b814830d4fa4914

See more details on using hashes here.

File details

Details for the file facleaning-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: facleaning-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for facleaning-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2869fed805700ee3f71de9ca806c5c8be20428dab394a0448581eff10913d8b9
MD5 ee490066c5643631ccc0e8cd238e8eb1
BLAKE2b-256 136d090ce6d8577bb7e8e594482bcfbf258ee4182bed9e9081f747d88e313405

See more details on using hashes here.

File details

Details for the file facleaning-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: facleaning-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for facleaning-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bc94fe9eb687f2d951b3e1fab278fb854df10dfec0b5ec5e371ecd4b75c97ed4
MD5 6d8edf3eb23fb20ca478e98b10cb396a
BLAKE2b-256 f629ec96daffba4df71cb7967ef1a6c75d7de2f7fc93c42df8eb41e6c299ed4e

See more details on using hashes here.

Supported by

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