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.2.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file normality-0.4.2.tar.gz
.
File metadata
- Download URL: normality-0.4.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d817af1b670697072b33b4a2990fbcf30938eeec34c741c2fe5d1ce7c8ad463 |
|
MD5 | e363f1b3845f12e467b650745523dbe0 |
|
BLAKE2b-256 | c474b6836dd6ac97af41fba10a30fd3074ffe764f5be8227d5885b731a955fc4 |
File details
Details for the file normality-0.4.2-py2-none-any.whl
.
File metadata
- Download URL: normality-0.4.2-py2-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7f31a10ca76826ebef155f3093803b23cefcbc2ec39b90d293aace44c6f45a7 |
|
MD5 | ed064829e09becfa41abca926e19c4de |
|
BLAKE2b-256 | a5a55448ae30202f610fea4b9e154d01e2ce20bafd7fd27ec1f7c0e7a824b4b2 |