Skip to content

Instantly share code, notes, and snippets.

View Sk7w4tch3r's full-sized avatar
🧊

Hesam Damghanian Sk7w4tch3r

🧊
View GitHub Profile
@imirzadeh
imirzadeh / clean.py
Created March 22, 2018 13:51
Persian Text Cleaner
persian_alphabet = '۱۲۳۴۵۶۷۸۹۰ٸآابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی'
def create_persian_sub_mapping():
kaf_alt = 'كڬڬڭګڪ'
gaf_alt = 'ڲڳ'
ye_alt = 'ۍېيێئ'
vav_alt = 'ۅۋۈۉٶۇۆۊؤٶ'
hamze_alt = 'ٳٱأٲإ'
he_alt = 'ۃۀہةە'