This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Name parser and formatter (for politicians, individuals, and organizations)

Project Description

This is the name parser and standardizer for the datacommons project. It now supports politician, individual and organization names.

Installation

Installation is easy:

pip install name-cleaver

Usage

Basic usage is the same for each type of name, just import the relevant NameCleaver class from one of:

  • PoliticianNameCleaver
  • IndividualNameCleaver
  • OrganizationNameCleaver

Example:

from name_cleaver import PoliticianNameCleaver smith = PoliticianNameCleaver(‘Smith, Robert J’).parse()

smith.first => “Robert” smith.middle => “J.” smith.last => “Smith”

print str(smith) => “Robert J. Smith”

Usage as above can usually be expected to return a Name object, but is not guaranteed to not throw an exception if NameCleaver is given unexpected input or otherwise can’t figure out what to do with a name. You can look for and handle Name Cleaver’s UnparseableNameException class. If you don’t want to deal with handling exceptions, NameCleaver has a safe mode:

smith = PoliticianNameCleaver(‘Smith, Robert J’).parse(safe=True)

In safe mode, if NameCleaver encounters an exception or doesn’t come up with a fully-formed name, it will return the original input string.

Release History

Release History

This version
History Node

0.6.0

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.15

History Node

0.4.14

History Node

0.4.13

History Node

0.4.12

History Node

0.4.11

History Node

0.4.10

History Node

0.4.9

History Node

0.4.8

History Node

0.4.7

History Node

0.4.6

History Node

0.4.5

History Node

0.4.4

History Node

0.4.2

History Node

0.4.1

History Node

0.4

History Node

0.3.1

History Node

0.3.0

History Node

0.2.13

History Node

0.2.12

History Node

0.2.11

History Node

0.2.10

History Node

0.2.9

History Node

0.2.8

History Node

0.2.7

History Node

0.2.6

History Node

0.2.5

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
name-cleaver-0.6.0.tar.gz (14.0 kB) Copy SHA256 Checksum SHA256 Source Oct 16, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting