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.

Source Distribution

nominally-1.0.0.tar.gz (25.8 kB view hashes)

Uploaded Source

Built Distribution

nominally-1.0.0-py3-none-any.whl (32.2 kB view hashes)

Uploaded Python 3

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