Thursday, June 6, 2013

Markov-Chain Name Generation

I haven't had internet for the last week, and honestly it was mostly rather nice.  Moved, got furniture, did a lot of leisure reading largely undistracted.  My modem came in today, though, so now I'm back, and am pleased to report that last night I wrote a simple script to tear apart names from the Onomastikon, find general probabilistic patterns of "given that the last n letters have been 'abc', the probability the next letter is 'd' is .9" using a markov chain of arbitrary order, and then generate great heaping piles of NPC or PC names which sound vaguely like they're from a particular part of the world.

Here's a sample of names derived from Medieval male German names (note that this set of names is comprised solely of names generated by the algorithm that were not in the original sample):

Adalberdus
Adalbertus
Adelstein
Aganhard
Aginhardus
Aginmund
Alarich
Albert
Albgastne
Albirichart
Amalrichart
Andhariman
Anshelm
Anshelmhart
Ansoberct
Ansobertus
Aranoldus
Archari
Archimbald
Arenher
Arenheri
Arenheribehrt
Arnolf
Arnwaldheri
Audegerus
Audes
Bald
Baldemar
Beraht
Berht
Berhtolfus
Berich
Bericus
Berinhart
Bernandus
Bert
Burcharat
Burgundo
Chonradus
Chonrat
Chustaf
Cunrad
Deigenandus
Diderich
Ditmar
Draganald
Ebert
Eburhard
Eckardis
Edelstan
Egino
Eidhere
Eidheri
Eidheribehrt
Einolf
Embricus
Emelrich
Emmericus
Ercanbaldavin
Ermenold
Ermenolf
Ernoldus
Ernus
Faramundo
Faramus
Fersomeric
Fersomerich
Fersomericus
Filiberct
Filibertus
Flanberct
Fraomanifred
Frid
Frideberht
Frideric
Fridus
Gadfridus
Gairbertus
Gairhart
Garih
Gast
Gautzelinus
Gebhardus
Gelfradulf
Gerbert
Gerbodolev
Gerbodoloff
Gerhard
Gerhartmudus
Gernardus
Giselbertilo
Gisilbertus
Glaupertus
Godafridus
Godesmann
Godohard
Godohelmhart
Godscalo
Gomerico
Gomericus
Gosberthar
Gosbertus
Gotzstaffus
Gundo
Gundus
Guntar
Guntmarus
Guntramund
Haimiricho
Hannes
Hapert
Hari
Harimannus
Hariwaldhere
Harpernust
Hart
Hartmann
Heimer
Heimeric
Heimeris
Helfradulnus
Helm
Helmus
Heri
Hertwinus
Hildebert
Hildebraht
Hildegar
Hildibragtus
Hluodohardus
Hnaufrid
Hrodeberhtolf
Hrodebertus
Hrodricho
Hrudoldus
Hrudolfus
Hruodlandico
Hunbert
Hunbertus
Isenbardo
Jofrid
Johanno
Judberthard
Judbertilo
Kuonrad
Lallobaudus
Land
Landeberht
Landeberhtolf
Landobald
Landobertus
Launobaud
Leonhart
Liukardus
Luitfrid
Luitgar
Lvfridericus
Lvfridurih
Madulf
Maganbold
Maganboldus
Magin
Maginfridus
Maginmund
Maginradus
Malberdus
Mallo
Mallobaudus
Manifrid
Manius
Meinfred
Meinfrid
Merobaud
Merobaudus
Mund
Nordemannus
Nordemar
Nordemarus
Ortolf
Radus
Raga
Raganbold
Raganboldus
Raganhardus
Raganheri
Raginmundo
Ragino
Raginolf
Reinbold
Richo
Ricohardus
Rudegaud
Rudolf
Rutha
Rutharimann
Sibert
Sibold
Sibrandus
Sifrid
Sigenhard
Stallobaud
Starchembalt
Tallobaudes
Thanchard
Theodemannus
Theodila
Theodorieks
Thiudoricus
Ulrich
Walahfridus
Wald
Waldhari
Waldhariwald
Waldhart
Waldheri
Walhbertus
Warenvald
Warin
Warinhard
Weidhar
Weidhartmann
Wercho
Wibilo
Widogastne
Willehelmus
Winther
Withar

I want to do town names next.  Still working on getting a good place to store my scripts for proper sharing, though...

4 comments:

Tom Hudson said...

Want. (Also, D'oh! Why didn't I do this years ago? Great idea.)

Brother Argos said...

Being able to generate appropriate names is a wonderful thing.

My ACKS Domain generator

http://www.iryth.com/dm/acksdm.html

Uses the same technology to generate names for domains based on culture chosen.

The latest version (as yet unreleased) adds greek and roman town names.

John said...

Nice! Where did you scrape town names from as your inputs?

Brother Argos said...

http://kepn.nottingham.ac.uk

They make the town names available as JSON formatted data.