Skip to main content

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/},
}

Metadata

Release files for khoshnevis 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for khoshnevis 0.1.5
File Size Uploaded Provenance Actions
khoshnevis-0.1.5.tar.gz 6.0 kB Without provenance Details for khoshnevis-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for khoshnevis 0.1.5
File Interpreter ABI Platform Actions
khoshnevis-0.1.5-py3-none-any.whl Python 3 none any Details for khoshnevis-0.1.5-py3-none-any.whl

Total release size: 13.5 kB

Release files / khoshnevis-0.1.5.tar.gz

Download URL khoshnevis-0.1.5.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1b0ed8b44361bd3768931a937ffc6308dcdd7aed72d4b7eeaf8bb67431288470
BLAKE2b-256 checksum
How to use checksums
fd03fb7a484d0580814e2345b1808af4f070b49c5aef9bf623b84bc63b54c199
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / khoshnevis-0.1.5-py3-none-any.whl

Download URL khoshnevis-0.1.5-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88531d48aa4bf1251dbdc9817e3aeca06d5bbdb41614192ff2df19851001ab39
BLAKE2b-256 checksum
How to use checksums
22b32a70654ca6a6c25e24ce131983db3f7bc3c6135a9da4a04da083a3a7cbfc
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for khoshnevis 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page