Farsi Tools: Tools for processing Farsi (Persian) text
Project description
Farsi Tools: tools for processing Farsi (Persian) text
Tested with:
- Python 3.5+
Use the following command to install using pip:
pip install farsi-tools
Usage example
Converting digits
Use replace_arabic_digits_with_farsi
method to replace arabic digits with farsi digits.
from farsi_tools import replace_arabic_digits_with_farsi
replace_arabic_digits_with_farsi('٤') # returns ۴
Use replace_ascii_digits_with_farsi
method to replace ASCII digits with farsi digits.
from farsi_tools import replace_ascii_digits_with_farsi
replace_ascii_digits_with_farsi('4') # returns ۴
Use replace_farsi_digits_with_ascii
method to replace farsi digits with ASCII digits.
from farsi_tools import replace_farsi_digits_with_ascii
replace_farsi_digits_with_ascii('۴') # returns 4
Use replace_arabic_digits_with_ascii
method to replace farsi digits with ASCII digits.
from farsi_tools import replace_arabic_digits_with_ascii
replace_arabic_digits_with_ascii('٤') # returns 4
Convert text to Farsi (Persian)
Use standardize_persian_text
method to convert characters to standard persian form
from farsi_tools import standardize_persian_text
standardize_persian_text('سلام خوبي؟ کمك ﻧميخواي؟') # returns "سلام خوبی؟ کمک نمیخوای؟"
Get Farsi (Persian) stop-words
Use stopwords
method to retrieve list of persian stop-words
from farsi_tools import stop_words
stop_words()
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
farsi_tools-0.2.tar.gz
(13.0 kB
view hashes)
Built Distribution
farsi_tools-0.2-py3-none-any.whl
(13.0 kB
view hashes)
Close
Hashes for farsi_tools-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9396dcbc6219754b570f893663e31b83aa10ba8c5916b361445b66584beb7e50 |
|
MD5 | b591f732f438b95d920a45343bc0acbe |
|
BLAKE2b-256 | 50ffc431144c6d579c0549e1899bcbd7ec9ab2d08566e198b7df8ad0ac1eeb30 |