namejen
Random name generator, written in Clojure, that uses Markov chains to follow common syllabic patterns. Inspired by this Python project.
When run standalone, the output is a column of names suitable for games, writing fiction, naming your pets and kids, etc. Your mileage may vary.
Substituting a different list of source names (see files in resources)
will change the flavor of the names, sometimes dramatically. For the
input provided, the output seems reminiscent of names from an
Iain M. Banks novel.
1 Examples
Deidra Olas Rafael Ms. Rochellye Ryce Xuan Amiltos Mr. Rain Brian Ms. Rnelieselottie Tendra Srta. Nora Adrianto Larence Holly, Jr. Ms. Cheryn Ning Ms. Ursula Anity Todd Gilda Rleen Cobson Gabrina Herr Chary Acey Trian, V Sra. Idre Izumi Jeri Mr. Ufus Zabeth Leslie Klaus Octavio Llen Stian Steen Ergeant Ms. Jerilynn Pratap Ms. Ronna Lastic Hiroko Spencer Mr. Jaime Odent Basil Aude Dirk, Sr. Erisa Doss Lake Main, Jr. Aniqua Hsin Ms. Mackenzie Tofer Oshua Jasonya Etry Mora Aryl Raif Sr. Obias Kerry, V Lane Dwight Rouk Mr. Noah Alter Giovanni Ms. Rucila Clyde Srta. Ulinetta Alastair Grice Erdar Arrell Oyuki, Jr. Milton Farouk, II Herr Dylan Ewis
2 Usage
2.1 As a standalone program
lein run # or build überjar and run resulting jar file.
2.2 As a library
To use the relevant functions, add the following to your project.clj:
The functions of interest are in the namejen.names namespace:
gen-name-data-as-mapgenerates gender, first name, honorific/prefix, surname(s), and generation info (Jr., III, etc.).format-name-mapformats the output of the previous function into something readable.- The
name-makerfunction is the composition of the two functions, for convenience.
2.3 TO DO list:
- Allow users to specify source of names
- Allow users to specify Markov chain lengths. The longer the Markov chain length, the more the names will sound like “real” names but the less variations you will get.
3 License
Copyright (C) 2012-2015 John Jacobsen.
Distributed under the Eclipse Public License, the same as Clojure.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.