Simple way to convert numeric HTML entities to far more readable named entities.
Project description
Installation
pip install namedentities
Failing that, fall back to the older approach:
easy_install namedentities
(You may need to begin these with “sudo “ to authorize installation.)
NOTA BENE Code runs successfully under Python 3, but packaging seemingly doesn’t work as yet.
Usage
Python 2:
from namedentities import named_entities u = u'both em\u2014and–dashes…' print named_entities(u)
Python 3:
from namedentities import named_entities u = 'both em\u2014and–dashes…' print(named_entities(u))
Credits
This is basically a packaging of Ian Beck’s work (described in http://beckism.com/2009/03/named_entities_python/)
Thank you, Ian!
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 Distributions
namedentities-1.0.6.zip
(7.1 kB
view details)
namedentities-1.0.6.tar.gz
(3.1 kB
view details)
File details
Details for the file namedentities-1.0.6.zip
.
File metadata
- Download URL: namedentities-1.0.6.zip
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6d4402e4ee4056316f97e14ccbf6f7efe3ad4b52237477e3389cfbc7b6eb134 |
|
MD5 | 8f15de9df0c49273537d99dec1aed2c1 |
|
BLAKE2b-256 | e63d35760b4fca046271207af06f2005d8c4b7179dcc1b272ce9cfc94e62431a |
File details
Details for the file namedentities-1.0.6.tar.gz
.
File metadata
- Download URL: namedentities-1.0.6.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e1d83e5e966f01e6bc9bafacc6bd616b5871c0457641fcb993670b2f6d5dd00 |
|
MD5 | eaf23a70653efe068f79b9a87684b3c0 |
|
BLAKE2b-256 | 1d1d58aa228e76c25a34813bdab2b942309d4db66e8beb972c0372a7407f3794 |