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.2.zip
(6.6 kB
view details)
namedentities-1.0.2.tar.gz
(3.0 kB
view details)
File details
Details for the file namedentities-1.0.2.zip
.
File metadata
- Download URL: namedentities-1.0.2.zip
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7be4e22fddebd3fd3df9ae80b93b8215396be553470b166ee47f4720b39698f9 |
|
MD5 | e02957ad8054d321fe7859d058908b8c |
|
BLAKE2b-256 | 2ad40b823b917c9e3bfcfdc8ea1dd648cc4ae03a84f948b7f7f441774440c18a |
File details
Details for the file namedentities-1.0.2.tar.gz
.
File metadata
- Download URL: namedentities-1.0.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e53dfe62f87318bec0d1416899d7f21e64777db568cdc8704bc8ac7895ad482 |
|
MD5 | a345b8914ea48598be583c0ee44af9ba |
|
BLAKE2b-256 | 9da6df5afb5830d8719beec1f6428c114b464dd30c4c050e4e3d5efdec710866 |