Skip to main content

A maximum-strength name parser for record linkage.

Project description

Nominally Logo

nominally: a maximum-strength name parser for record linkage

License: AGPL 3.0+ Package hosted on PyPI Code Climate maintainability Builds at CircleCI Read the Docs (latest) Latest commit

🖥️ Examples

Run a quick name at the command line:

$ nominally "Jimmy Blankinsop"
       raw: Jimmy Blankinsop
   cleaned: jimmy blankinsop
    parsed: blankinsop, jimmy
      list: ['', 'jimmy', '', 'blankinsop', '', '']
     title:
     first: jimmy
    middle:
      last: blankinsop
    suffix:
  nickname:

Pull out the major parts...

$ python -q
>>> from nominally import parse_name
>>> parse_name("Blankinsop, Jr., Mr. James 'Jimmy'")
{
  'title': 'mr',
  'first': 'james',
  'middle': '',
  'last': 'blankinsop',
  'suffix': 'jr',
  'nickname': 'jimmy'
}

Or separate into individual parts; complete string; lists; dicts...

$ python -q
>>> from nominally import Name
>>> n = Name("DR. PEACHES BARTKOWICZ")
>>> n
Name({'title': 'dr', 'first': 'peaches', 'middle': '', 'last': 'bartkowicz', 'suffix': '', 'nickname': ''})
>>> str(n)
'dr peaches bartkowicz'
>>> dict(n)
{
  'title': 'dr',
  'first': 'peaches',
  'middle': '',
  'last': 'bartkowicz',
  'suffix': '',
  'nickname': ''
}
>>> list(n.values())
['dr', 'peaches', '', 'bartkowicz', '', '']
>>> n.first
'peaches'
>>> n.last
'bartkowicz'
>>> n.raw
'DR. PEACHES BARTKOWICZ'
>>> n.report()
{
  'raw': 'DR. PEACHES BARTKOWICZ',
  'cleaned': 'dr peaches bartkowicz',
  'parsed': 'bartkowicz, dr peaches',
  'list': ['dr', 'peaches', '', 'bartkowicz', '', ''],
  'title': 'dr',
  'first': 'peaches',
  'middle': '',
  'last': 'bartkowicz',
  'suffix': '',
  'nickname': ''
}

🔬 Elaborate Examples

For fully worked examples, see: https://github.com/vaneseltine/nominally-examples/

🧙‍ Author

Matt VanEseltine

matvan@umich.edu

https://git.sr.ht/~matvan

https://github.com/vaneseltine

https://twitter.com/vaneseltine

https://stackoverflow.com/users/7846185/matt-vaneseltine

🎓 Beginnings

Nominally started as a fork of the python-nameparser package, and has benefitted considerably from this origin⸺especially the testing foundation.

Project details


Download files

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

Files for nominally, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size nominally-1.0.3-py3-none-any.whl (33.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nominally-1.0.3.tar.gz (26.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page