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``).
[![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
Release history Release notifications | RSS feed
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.1.tar.gz
(6.5 kB
view details)
Built Distribution
File details
Details for the file normality-0.4.1.tar.gz
.
File metadata
- Download URL: normality-0.4.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c610fef080892609b9608dc2eea98dea6cfb852f1605a434553124db671b639 |
|
MD5 | 2acafd0e214468fd5f854265655e0ef8 |
|
BLAKE2b-256 | d41472a080651e4db97277bad35a9ef8a8ef0052d34f3f7a1710535e5414ebfe |
File details
Details for the file normality-0.4.1-py2-none-any.whl
.
File metadata
- Download URL: normality-0.4.1-py2-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb1d24fda36f1f1d71ba2702bde806b528f08e409f7b776154d47f63db4c48c5 |
|
MD5 | 9ed68daf639d804c0d993b7f371ceb38 |
|
BLAKE2b-256 | 7bb089848bc30825eeda26aecd18b0097812d8185bfa7713839721952343d465 |