Skip to main content

No project description provided

Project description

Persian Text Normalizer (Hazm Fork)

This project is a lightweight fork of the Hazm library, focusing solely on the Normalizer class to normalize Persian text. It is designed for easy installation with minimal dependencies, avoiding the issues of deprecated packages and version mismatches.

Features:

  • Normalizes Persian text by removing unnecessary characters and correcting common text issues.
  • No external dependencies or conflicting libraries, making it a lightweight option for Persian text processing.

Installation:

To install this package, clone the repository and install the required dependencies using:

python -m venv env
source env/bin/activate
pip install -r requirements.txt

or just use the pip-installable package

python -m venv env
source env/bin/activate
pip install pip_installable_package/hazm_normalizer-0.1.0-py3-none-any.whl

Example Usage:

from hazm_normalizer import Normalizer

# Initialize the Normalizer class
normalizer = Normalizer()

# Persian text to normalize
text = """
اصلاح نويسه‌ها و استفاده از نیم‌فاصله پردازش را آسان می‌کند و حروف عربي استفاده شده غلط مانند کُ و ي را حذف می‌کند.
"""

# Normalize the text
result = normalizer.normalize(text)

print(result)
'اصلاح نویسه‌ها و استفاده از نیم‌فاصله پردازش را آسان می‌کند و حروف عربی استفاده‌شده غلط مانند ک و‌ ی را حذف می‌کند. '

License:

This project is a fork of the Hazm project and is licensed under the MIT License. See the LICENSE file for details.

Future Work:

  • Plan to publish this as a package on PyPI for easy installation via pip.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hazm_normalizer-0.2.0.tar.gz (782.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hazm_normalizer-0.2.0-py3-none-any.whl (787.3 kB view details)

Uploaded Python 3

File details

Details for the file hazm_normalizer-0.2.0.tar.gz.

File metadata

  • Download URL: hazm_normalizer-0.2.0.tar.gz
  • Upload date:
  • Size: 782.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for hazm_normalizer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2527b5a1f44006e3f6538f672c2a2008296eb15239d9322c2e06645ae1d1e70e
MD5 8391251fe0184753156069c387bdba5d
BLAKE2b-256 0ac956fee5986a471b8868c60f81e54fa4f625ce229eef307352c6b540ec544d

See more details on using hashes here.

File details

Details for the file hazm_normalizer-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hazm_normalizer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6080ffbd679bee87c268235165710788ac8829f3beebb92b42d5a977127ebd88
MD5 d6e9801cc4d20585253ac780e21ffbb8
BLAKE2b-256 12d4e460cbab2928d5536954d3ce2825683a7460070350b9fadc25f98b637b10

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page