--- id: normality version: "3.1.0" license: Copyright (c) 2013-2025, Friedrich Lindenberg, Gregor Aisch Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # normality — Micro-library to normalize text strings License: permissive · Maintenance: active · Downloads: 294.8K/mo ## What it is and what it does Normality is a lightweight text-preprocessing library that applies a suite of Unicode normalization functions to prepare text for analysis. It removes diacritics (accents), punctuation, excess whitespace, and other character classes in a single pass, and can generate URL-safe slugs from arbitrary text. The package is built around a small set of composable functions—normalize, slugify, collapse_spaces, ascii_text, latinize_text—each handling a specific normalization task. As of version 3.0, normality requires pyicu as a mandatory dependency, which brings full Unicode Collation Algorithm support but adds a system-level dependency. The package supports Python 3.10 through 3.13 and is actively maintained. It is useful as a preparation step for text analysis pipelines, search indexing, or any workflow where consistent text representation matters. Use it for: - Normalize user-supplied text before indexing into a search engine or database. - Generate URL-safe slugs from article titles or user-generated content. - Clean and deduplicate text fields by removing diacritics and punctuation before comparison. - Preprocess multilingual text for downstream NLP or machine learning tasks. - Collapse irregular whitespace in scraped or imported text data. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Normality removes diacritics, punctuation, and other character classes from Unicode text to prepare it for downstream analysis, offering functions like normalize, slugify, and collapse_spaces. Yes. Normality is a mature, actively maintained library with no known vulnerabilities, low install friction, and a permissive MIT license. It solves a concrete text-preprocessing problem with a small, focused API. Install it if you need to normalize Unicode text; avoid it only if pyicu is unavailable in your environment and you cannot use an older version. ## Install pip install normality uv add normality poetry add normality ## Installing normality Before you install: Low friction install with a pure-Python wheel. Actively maintained as of 2026-03-08 with recent commits. Note: version 3.0 and later require pyicu as a mandatory dependency; if that is unavailable in your environment, consider pinning to normality < 3.0.0. License in practice: MIT license (permissive). You may use, modify, and distribute normality freely in commercial and private projects, provided you retain the copyright notice and license text. Quickstart: pip install normality from normality import normalize, slugify text = normalize('Nie wieder "Grüne Süppchen" kochen!') slug = slugify('My first blog post!') Requires Python 3.10 or later. Version 3.0+ requires pyicu, which may need system ICU libraries; if unavailable, use normality < 3.0.0. Verify before relying: - Whether pyicu is available in your target deployment environment (it requires system ICU libraries on some platforms). ## Package facts - License: Copyright (c) 2013-2025, Friedrich Lindenberg, Gregor Aisch Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 294.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags text normalization unicode, remove diacritics punctuation, text slugification, unicode text cleaning, normalize whitespace, text preprocessing, character normalization, text-preprocessing, unicode-handling [View on SkillFed](https://skillfed.io/packages/normality) · [View on PyPI](https://pypi.org/project/normality/)