Normality is a Python micro-package (current version 3.1.0) that provides a small set of text normalization functions for easier re-use. It accepts unicode or utf-8 encoded text and removes various classes of characters, such as diacritics and punctuation. This library is actively maintained and is useful as a preparation step for further text analysis.
pip install normalityVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the core normalization functions of the `normality` library, including `normalize` for general text cleaning, `slugify` for creating URL-friendly slugs, and `collapse_spaces` for standardizing whitespace.
Ensure `pyicu` is installed in your environment (`pip install pyicu`) or downgrade to `normality==2.*`.
Verify the intended purpose: `normality` (pudo/normality) for text, `scipy.stats.normaltest` (or similar) for statistical distribution testing.
Install the `pyicu` package: `pip install pyicu`.
If you intend to perform statistical normality tests, import from `scipy.stats`: `from scipy.stats import normaltest`. If you want text normalization, use functions like `normality.normalize()`.