Name | normality JSON |
Version |
3.0.1
JSON |
| download |
home_page | None |
Summary | Micro-library to normalize text strings |
upload_time | 2025-07-27 12:02:37 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
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
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
normalization
slugs
text
unicode
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# normality
[](https://github.com/pudo/normality/actions/workflows/build.yml)
Normality is a Python micro-package that contains a small set of text normalization functions for easier re-use. These functions accept a snippet of unicode or utf-8 encoded text and remove various classes of characters, such as diacritics, punctuation etc. This is useful as a preparation to further text analysis.
**WARNING**: As of version 3.0, `normality` requires `pyicu` as a mandatory dependency. If you cannot install `pyicu`, consider using `normality < 3.0.0`.
## Example
```python
# coding: utf-8
from normality import normalize, slugify, collapse_spaces, ascii_text, latinize_text
text = normalize('Nie wieder "Grüne Süppchen" kochen!')
assert text == 'nie wieder grune suppchen kochen'
slug = slugify('My first blog post!')
assert slug == 'my-first-blog-post'
text = 'this \n\n\r\nhas\tlots of \nodd spacing.'
assert collapse_spaces(text) == 'this has lots of odd spacing.'
```
## License
``normality`` is open source, licensed under a standard MIT license (included in this repository as ``LICENSE``).
Raw data
{
"_id": null,
"home_page": null,
"name": "normality",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "normalization, slugs, text, unicode",
"author": null,
"author_email": "Friedrich Lindenberg <friedrich@pudo.org>",
"download_url": null,
"platform": null,
"description": "# normality\n\n[](https://github.com/pudo/normality/actions/workflows/build.yml)\n\nNormality is a Python micro-package that contains a small set of text normalization functions for easier re-use. These functions accept a snippet of unicode or utf-8 encoded text and remove various classes of characters, such as diacritics, punctuation etc. This is useful as a preparation to further text analysis.\n\n**WARNING**: As of version 3.0, `normality` requires `pyicu` as a mandatory dependency. If you cannot install `pyicu`, consider using `normality < 3.0.0`.\n\n## Example\n\n```python\n# coding: utf-8\nfrom normality import normalize, slugify, collapse_spaces, ascii_text, latinize_text\n\ntext = normalize('Nie wieder \"Gr\u00fcne S\u00fcppchen\" kochen!')\nassert text == 'nie wieder grune suppchen kochen'\n\nslug = slugify('My first blog post!')\nassert slug == 'my-first-blog-post'\n\ntext = 'this \\n\\n\\r\\nhas\\tlots of \\nodd spacing.'\nassert collapse_spaces(text) == 'this has lots of odd spacing.'\n```\n\n## License\n\n``normality`` is open source, licensed under a standard MIT license (included in this repository as ``LICENSE``).\n",
"bugtrack_url": null,
"license": "Copyright (c) 2013-2025, Friedrich Lindenberg, Gregor Aisch\n \n Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sell copies of the Software, and to\n permit persons to whom the Software is furnished to do so, subject to\n the following conditions:\n \n The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Micro-library to normalize text strings",
"version": "3.0.1",
"project_urls": {
"Documentation": "https://github.com/pudo/normality",
"Issues": "https://github.com/pudo/normality/issues",
"Repository": "https://github.com/pudo/normality.git"
},
"split_keywords": [
"normalization",
" slugs",
" text",
" unicode"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "6ece8d469c4f2431346f067f840e2cc15177771bdb14095456023de84e1a7b5c",
"md5": "4c0386aef28ac056603a8c69c09f2d6e",
"sha256": "c282c1990eb65b2859649a2ffca9fee081f6b106f45ff62e37db1418a0c8fae6"
},
"downloads": -1,
"filename": "normality-3.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4c0386aef28ac056603a8c69c09f2d6e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 17383,
"upload_time": "2025-07-27T12:02:37",
"upload_time_iso_8601": "2025-07-27T12:02:37.997420Z",
"url": "https://files.pythonhosted.org/packages/6e/ce/8d469c4f2431346f067f840e2cc15177771bdb14095456023de84e1a7b5c/normality-3.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-27 12:02:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pudo",
"github_project": "normality",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "normality"
}