namegen

This library offers high performance random name generation with sub-microsecond full names on even older computers. My use case for this is a website, but I've left this general enough to even fit into other procedural generation systems.

Features

Formats

The name formats has a special syntax. They're what describes how to build a full name from the parts. The tokens are in curly braces, and they mean the following.

Here are a few examples.

Generators

markov

Generate names using a second-order markov chain. This is not a naive implementation, however, and some constraints has been made to create more faithful names:

cfgrammar

Generate names using a context-free grammar, with some constraints to keep symbol frequencies in check and to deal with those damn ys.

wordlist

A simple word list generator, for the cases where output should be one of the samples. The samples can be weighted.