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.3.zip
(6.7 kB
view details)
namedentities-1.0.3.tar.gz
(3.0 kB
view details)
File details
Details for the file namedentities-1.0.3.zip
.
File metadata
- Download URL: namedentities-1.0.3.zip
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d1c981823396e7520f551a0394fbf26ffa0d6fc96a4bbac4fafd379c81e9a18 |
|
MD5 | 53746291c833d0cb2475de380a6fbb28 |
|
BLAKE2b-256 | 340ea5109ee6ce066322ba0bb7e49e0505c85f958a2292173b129a1aade7668a |
File details
Details for the file namedentities-1.0.3.tar.gz
.
File metadata
- Download URL: namedentities-1.0.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2dca9667359a8f525230685411ef7baf0055c0a4b32e4e9f79db59eab33b574 |
|
MD5 | ac0da342b06c7cfc864b36a5673261a5 |
|
BLAKE2b-256 | 1fbb8ad308ae2c3c376e41ceeaa88229be84eff5d36a127e4d7920864e95a904 |