Khodnevis Normalizer
Project description
Khoshnevis (خوشنويس)
Python package for normalizing Persian text.
- Text Cleaning
- URL Remover
- Emoji Remover
- Text Tokenization
- Punctuation Space Correction
- Half Space Correction (using Parsivar)
- Standardize Alphabet
- NLTK compatible
- Python 3 support
Usage
>>> from khoshnevis import Normalizer
>>> normalizer = Normalizer()
>>> normalizer.normalize(text="استفاده از نیمفاصله متن را زیبا مي كند", zwnj="\u200c",
clean_url=False, remove_emoji=False)
text (str): input text
zwnj (str, optional): Zero-width non-joiner character. Defaults to "\u200c".
clean_url (bool, optional): removes all URLs from text. Defaults to True.
remove_emoji (bool, optional): removes all emojis from the text. Defaults to True.
Installation
The latest stable version of Hazm can be installed through pip:
pip install khoshnevis
Citation info
@misc{khoshnevis,
author = {HamidReza Attar, Milad Lotfi, Saied Alimoradi},
title = {Khoshnevis, a Python library for Persian text preprocessing},
year = {2022},
url= {https://www.khodnevisai.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
khoshnevis-0.1.5.tar.gz
(6.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file khoshnevis-0.1.5.tar.gz.
File metadata
- Download URL: khoshnevis-0.1.5.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.28.1 rfc3986/1.5.0 tqdm/4.64.0 urllib3/1.26.5 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b0ed8b44361bd3768931a937ffc6308dcdd7aed72d4b7eeaf8bb67431288470
|
|
| MD5 |
b94383785f8cdcc1d527735bbb044aab
|
|
| BLAKE2b-256 |
fd03fb7a484d0580814e2345b1808af4f070b49c5aef9bf623b84bc63b54c199
|
File details
Details for the file khoshnevis-0.1.5-py3-none-any.whl.
File metadata
- Download URL: khoshnevis-0.1.5-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.28.1 rfc3986/1.5.0 tqdm/4.64.0 urllib3/1.26.5 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88531d48aa4bf1251dbdc9817e3aeca06d5bbdb41614192ff2df19851001ab39
|
|
| MD5 |
284cf9d6596634c9f20d47f867dc2e80
|
|
| BLAKE2b-256 |
22b32a70654ca6a6c25e24ce131983db3f7bc3c6135a9da4a04da083a3a7cbfc
|