Skip to main content

Micro-library to normalize text strings

Project description

# 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.

## Example

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

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'
```

## Extended usage

Read the source code, it's twenty lines of stuff.

![RTSL](http://cdn.meme.am/instances/500x/58064648.jpg)

## License

``normality`` is open source, licensed under a standard MIT license
(included in this repository as ``LICENSE``).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

normality-0.4.2.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

normality-0.4.2-py2-none-any.whl (7.7 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page