Skip to main content

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.)

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


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.zip (3.6 kB view hashes)

Uploaded Source

namedentities-1.0.tar.gz (1.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page