Baby Naming Algorithm (Python)

By | October 27, 2019

To help name my coworkers babies, I wrote this script. It works as follows:

  1. Popularity:  This is done via a beta distribution. An alpha parameter of 1 prioritizes the most common names, and higher numbers produce less common names.
  2. Alliteration: Prioritizes first names to match the first letter of the last name.
  3. Syllable count: Lowers priority of names in which the first name has the same number of syllables as the last name. It uses the syllables python package.

To run it, you will need the top baby name list for a given year (as a txt file), which you can get from this zip file from the Social Security website.

This is the code: