bnunicodenormalizer (v0.1.7) is a Python library designed for normalizing Bangla Unicode text. It provides tools to clean and standardize Bangla text by addressing inconsistent character representations, digit forms, and other common challenges, making the text suitable for various Natural Language Processing (NLP) tasks. The library saw active development in mid-2023 and is currently in maintenance.
pip install bnunicodenormalizerVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to initialize the Normalizer and use it to process a simple Bangla text string. The default initialization attempts to load necessary mapping files from the installed package directory.
Ensure the provided `romanize_mapping_path` is an absolute and correct path to a valid JSON file, or omit the argument to use the default package-provided mapping.
Pin your dependency to an exact version (`bnunicodenormalizer==0.1.7`) in `requirements.txt` or `pyproject.toml` to prevent unexpected updates. Review release notes for new versions before upgrading.
If `fasttext` installation fails, consult the `fasttext` documentation for system-specific prerequisites (e.g., `build-essential` on Debian/Ubuntu, XCode command line tools on macOS). You may need to install it separately first (`pip install fasttext`).
Ensure `bnunicodenormalizer` is properly installed via `pip install bnunicodenormalizer`. If providing a custom `romanize_mapping_path`, double-check the file existence and permissions for that path.
Install the package using `pip install bnunicodenormalizer`. If using virtual environments, ensure your IDE or terminal is activated to the correct environment.
Access dictionary keys using square bracket notation, e.g., `result['normalized_text']`. The returned dictionary structure is `{'normalized_text': '...', 'detected_lang': '...'}` (if language detection is enabled).