unifying person names in different notations
Project description
Person Name Normalisation
Unifying person names in different notations
different sources write person names in different notations:
- Firstname Secondname Lastname
- Lastname, Firstname Secondname
also extracted are:
- academic degrees (e.g. 'Dr.', 'Ph.D.')
- name prefixes (e.g. 'van ter', 'von', 'De')
included: german, french, italian, dutch
missing: spanish, portuguese
missing: double Lastnames in Spanish
Installation
pip install personnamenorm
Usage
import personnamenorm as pnn
nameobj = pnn.namenorm('Dr. Dipl. Firstname Secondname von und zu Lastname')
results in
nameobj.name <dict>
{
'raw': 'Dr. Dipl. Firstname von und zu Lastname',
'Firstname': ['Firstname','Secondname'],
'Lastname': ['Lastname'],
'title': ['Dr.','Dipl.'],
'prefix': ['von und zu']
}
nameobj.fullname <str>
'von und zu Lastname, Firstname Secondname'
nameobj.fullname_abbrev <str>
'von und zu Lastname, F S'
more examples can be found in this file on github.
Debug-mode
by default debug mode is off.
activating the debug mode
nameobj = pnn.namenorm(<str>, True)
returns additional information as logging message.
- used annotation dictionary
- annotated input string as list of tuples
Logging
logging is implemented
- writes to std-out if logging IS NOT enabled before
- writes to the existing logging handler if other logging IS enabled before
Test
see folder 'tests' on github.
python test_personnamenorm.py
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
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file personnamenorm-0.2-py3-none-any.whl
.
File metadata
- Download URL: personnamenorm-0.2-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f05eed8e31aaac5e70ccc9683727820fcc7a1812d0e879ff09be414c06811ee |
|
MD5 | 7bf3dafe6feed53fce83f1522f12d967 |
|
BLAKE2b-256 | 7feb7df80a23cc16b066954e32f8cc79d7844ca845ad0ff04282d02a68903279 |