Metadata-Version: 2.4
Name: normality
Version: 2.1.1
Summary: Micro-library to normalize text strings
Home-page: http://github.com/pudo/normality
Author: Friedrich Lindenberg
Author-email: friedrich@pudo.org
License: MIT
Keywords: text unicode normalization slugs
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: banal>=1.0.1
Requires-Dist: text-unidecode
Requires-Dist: chardet
Provides-Extra: icu
Requires-Dist: pyicu>=1.9.3; extra == "icu"
Provides-Extra: dev
Requires-Dist: pyicu>=1.9.3; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# normality

[![Build Status](https://travis-ci.org/pudo/normality.svg?branch=master)](https://travis-ci.org/pudo/normality)

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**: This library works much better when used in combination 
with ``pyicu``, a Python binding for the International Components for
Unicode C library. ICU provides much better text transliteration than
the default ``text-unidecode``.

## Example

```python
# coding: utf-8
from normality import normalize, slugify, collapse_spaces

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``).
