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
Project details
Release history Release notifications | RSS feed
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 hashes)
Built Distributions
Close
Hashes for facleaning-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2869fed805700ee3f71de9ca806c5c8be20428dab394a0448581eff10913d8b9 |
|
MD5 | ee490066c5643631ccc0e8cd238e8eb1 |
|
BLAKE2b-256 | 136d090ce6d8577bb7e8e594482bcfbf258ee4182bed9e9081f747d88e313405 |
Close
Hashes for facleaning-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc94fe9eb687f2d951b3e1fab278fb854df10dfec0b5ec5e371ecd4b75c97ed4 |
|
MD5 | 6d8edf3eb23fb20ca478e98b10cb396a |
|
BLAKE2b-256 | f629ec96daffba4df71cb7967ef1a6c75d7de2f7fc93c42df8eb41e6c299ed4e |