<commit_before>dpj-moniker
=======
### overview
what is this?
--------------------------------------
this is a utility that helps with english name/salutation/suffix parsing. this library will parse names in the following formats :
- "<NAME>" (standard) 
- "doe, john" (surname first, separated by comma) 
- "doe, john & jane" (surname first, multiple firstnames separated by 'and|&|or') 
- "doe, john & dae, jane" (multiple names in BYLAST format separated by 'and|&|or')
- "john or <NAME>" (multiple firstnames separated by '&/and/or', more or less in STANDARD format) 

why?
--------------------------------------
i needed to convert a long list of names with no firstname/lastname fields (~3000) into a normalized database with first, middle and last names all needed (middlename optional of course), each one of the primary entries had 0, 1, 2, or 3 emergency contacts that also needed to placed in the database as regular entries but linked to the original entries. i noticed a few patterns apparent in most of the ~10k entries and automated the process. it's served it's purpose, and hopefully this can become more thorough and useful to others in the future. 

### getting started
installation
--------------------------------------
you can install moniker by running this command..
```shell
npm install dpj-moniker
```

use
--------------------------------------
```js
var moniker = require('dpj-moniker');

// parse a single name...
moniker.parse('<NAME>'); 
// => { firstname : 'Tony', middlename : 'Edward', lastname : 'Stark' }

// parse several names...
moniker.parse([
    'Potts, Pepper',
    'Storm, Sue & Johnny',
    'Mario or <NAME>'
]);
/*
=> [
    { firstname : 'Pepper', lastname : 'Potts' },
    { firstname : 'Sue', lastname : 'Storm' },
    { firstname : 'Johnny', lastname : 'Storm' },
    { firstname : 'Mario', lastname : 'Mario' },<commit_msg>added link to blog post<commit_after>dpj-moniker
=======
### overview
what is this?
--------------------------------------
this is a utility that helps with english name/salutation/suffix parsing. this library will parse names in the following formats :
- "<NAME>" (standard) 
- "<NAME>" (surname first, separated by comma) 
- "doe, john & jane" (surname first, multiple firstnames separated by 'and|&|or') 
- "doe, john & dae, jane" (multiple names in BYLAST format separated by 'and|&|or')
- "john or <NAME>" (multiple firstnames separated by '&/and/or', more or less in STANDARD format) 

why?
--------------------------------------
i needed to convert a long list of names with no firstname/lastname fields (~3000) into a normalized database with first, middle and last names all needed (middlename optional of course), each one of the primary entries had 0, 1, 2, or 3 emergency contacts that also needed to placed in the database as regular entries but linked to the original entries. i noticed a few patterns apparent in most of the ~10k entries and automated the process. it's served it's purpose, and hopefully this can become more thorough and useful to others in the future. 

you can read more the background the project that required moniker and my approach [at this blog post](http://dennisporterjr.com/moniker/)

### getting started
installation
--------------------------------------
you can install moniker by running this command..
```shell
npm install dpj-moniker
```

use
--------------------------------------
```js
var moniker = require('dpj-moniker');

// parse a single name...
moniker.parse('<NAME>'); 
// => { firstname : 'Tony', middlename : 'Edward', lastname : 'Stark' }

// parse several names...
moniker.parse([
    '<NAME>',
    'Storm, Sue & Johnny',
    'Mario or <NAME>'
]);
/*
=> [
    { firstname : 'Pepper', lastname : 'Potts' },
    { firstname : 'Sue', lastname : 'Storm' },
    { firstname : 'Johnny', lastname : 'Storm' },
    { firstname : 'Mario', lastname : 'Mario' },
{'fraction_non_alphanumeric': 0.19042717447246527, 'fraction_numerical': 0.0051466803911477095, 'mean_word_length': 2.8220255653883974, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4245798', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1065, 'n_words': 468}