Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Next
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
Twitch
YouTube
Facebook (EN Publishing)
Facebook (EN World)
Twitter
Instagram
TikTok
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
The
VOIDRUNNER'S CODEX
is coming! Explore new worlds, fight oppressive empires, fend off fearsome aliens, and wield deadly psionics with this comprehensive boxed set expansion for 5E and A5E!
Community
General Tabletop Discussion
*TTRPGs General
Non-evocative Names
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ichabod" data-source="post: 9328519" data-attributes="member: 1257"><p>Okay, I whipped together a variant of some code I've written before. It takes a word (name) list and makes new words/names based on three letter frequencies from the original list, counting the start and the end of a word/name. Using some US census data I found online somewhere, I got the following male names from it: Kellyes, Hirontha, Mardolly, Chita, Zarl, Juntabalil, Lenick, Gleshi, Gaddon, Rodiel, Papirver, Kerani, Keriel, Liosz, Kitran, Eranne, Orajohn, Clella. </p><p></p><p>You could then use the same frequency data to give a "popularity" score to each name. Here's a sample: [(5560, 'Karick'), (5283, 'Alongs'), (4839, 'Tolani'), (4700, 'Herion'), (4695, 'Sirodi'), (4335, 'Porion'), (4204, 'Chels'), (3909, 'Anthael'), (3788, 'Baitn'), (3544, 'Michama'), (3426, 'Saftaro'), (3410, 'Slomana'), (3301, 'Haldena'), (3256, 'Blainte'), (3105, 'Gerleem'), (2357, 'Bhan'), (1117, 'Toicelize'), (721, 'Tyqueredaro')]</p><p></p><p>Here's some female names for comparison: Kionnasha, Darenee, Khunia, Lalera, Ernet, Tifaela, Gersha, Yerie, Reaun, Kethi, Khylis, Wynniya, Jadahy, Sharal, Raili, Cheryet, Rosara, Caria</p><p></p><p>Now, these names are from the US census, so they will be biased toward English names, but with various other ethnicities mixed in. But if you could get name lists based on a particular ethnicity, you could generate new names based on that list, and assign those names to a particular fantasy race. Or you could do it with names from a scientific dictionary, or a list of dinosaur names, or a list of names with a 'd' in them.</p><p></p><p>[CODE]"""</p><p>nomenclator.py</p><p></p><p>Yet another fantasy name generator.</p><p>"""</p><p></p><p>import collections</p><p>import random</p><p></p><p>class Nomenclator(object):</p><p></p><p> def __init__(self, word_list):</p><p> # Parse the parts of the words.</p><p> self.check = set(word_list)</p><p> self.starts = collections.Counter()</p><p> self.pairs = collections.defaultdict(collections.Counter)</p><p> self.ends = collections.defaultdict(collections.Counter)</p><p> self.lengths = collections.Counter()</p><p> self.mean_length = 0</p><p> for word in word_list:</p><p> word = word.strip()</p><p> self.lengths[len(word)] += 1</p><p> self.mean_length += len(word)</p><p> self.starts[word[0]] += 1</p><p> word = f'^{word}'</p><p> for pair_ndx in range(len(word) - 2):</p><p> self.pairs[word[pair_ndx:(pair_ndx + 2)]][word[pair_ndx + 2]] += 1</p><p> self.ends[word[-3:-1]][word[-1]] += 1</p><p> self.mean_length /= len(word_list)</p><p> # Convert the data to a form usable by choices.</p><p> self.starts = {'population': tuple(self.starts.keys()),</p><p> 'weights': tuple(self.starts.values())}</p><p> new_pairs = {}</p><p> for pair in self.pairs:</p><p> new_pairs[pair] = {'population': tuple(self.pairs[pair].keys()),</p><p> 'weights': tuple(self.pairs[pair].values())}</p><p> self.pairs = new_pairs</p><p> new_ends = {}</p><p> for almost in self.ends:</p><p> new_ends[almost] = {'population': tuple(self.ends[almost].keys()),</p><p> 'weights': tuple(self.ends[almost].values())}</p><p> self.ends = new_ends</p><p> self.lengths = {'population': tuple(self.lengths.keys()),</p><p> 'weights': tuple(self.lengths.values())}</p><p></p><p> def name(self):</p><p> """Generate a new name. (str)"""</p><p> while True:</p><p> try:</p><p> # Get a random start and length.</p><p> name = '^' + random.choices(**self.starts)[0]</p><p> length = random.choices(**self.lengths)[0]</p><p> # Add letters based on the last two letters of the name.</p><p> while len(name) < length:</p><p> name += random.choices(**self.pairs[name[-2:]])[0]</p><p> # Add a final character.</p><p> name += random.choices(**self.ends[name[-2:]])[0]</p><p> except KeyError:</p><p> continue</p><p> # Make sure that the name is new.</p><p> name = name[1:]</p><p> if name not in self.check:</p><p> return name</p><p></p><p> def names(self, n = 18, popularity = False):</p><p> """</p><p> Generate a list of unique names. (list)</p><p></p><p> Parameter:</p><p> n: How many names to generate. (int)</p><p> """</p><p> name_list = []</p><p> while len(name_list) < n:</p><p> new_name = self.name()</p><p> if new_name not in name_list:</p><p> name_list.append(new_name)</p><p> if popularity:</p><p> name_list = [(self.popularity(name), name) for name in name_list]</p><p> name_list.sort(reverse = True)</p><p> return name_list</p><p></p><p> def popularity(self, name):</p><p> """</p><p> Get a normalized popularity score for a given name. (int)</p><p></p><p> Parameters:</p><p> name: A name that could be generated by this nomenclator. (str)</p><p> """</p><p> len_score = self.lengths['weights'][self.lengths['population'].index(len(name))]</p><p> ltr_score = self.starts['weights'][self.starts['population'].index(name[0])]</p><p> name = f'^{name}'</p><p> for ltr_ndx in range(len(name) - 3):</p><p> ltrs = name[ltr_ndx:(ltr_ndx + 2)]</p><p> weight_ndx = self.pairs[ltrs]['population'].index(name[ltr_ndx + 2])</p><p> ltr_score += self.pairs[ltrs]['weights'][weight_ndx]</p><p> ltrs = name[-3:-1]</p><p> ltr_score += self.ends[ltrs]['weights'][self.ends[ltrs]['population'].index(name[-1])]</p><p> return int((ltr_score / (len(name) - 1)) * self.mean_length + len_score)</p><p></p><p>if __name__ == '__main__':</p><p> census = []</p><p> with open(r'..\Data\us-names-by-gender.csv') as name_file:</p><p> for line in name_file:</p><p> sex, name, count = line.split(',')</p><p> if sex == 'F':</p><p> census.append(name)</p><p> n = Nomenclator(census)</p><p> print(', '.join(n.names()))</p><p> print(n.names(popularity = True))</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="ichabod, post: 9328519, member: 1257"] Okay, I whipped together a variant of some code I've written before. It takes a word (name) list and makes new words/names based on three letter frequencies from the original list, counting the start and the end of a word/name. Using some US census data I found online somewhere, I got the following male names from it: Kellyes, Hirontha, Mardolly, Chita, Zarl, Juntabalil, Lenick, Gleshi, Gaddon, Rodiel, Papirver, Kerani, Keriel, Liosz, Kitran, Eranne, Orajohn, Clella. You could then use the same frequency data to give a "popularity" score to each name. Here's a sample: [(5560, 'Karick'), (5283, 'Alongs'), (4839, 'Tolani'), (4700, 'Herion'), (4695, 'Sirodi'), (4335, 'Porion'), (4204, 'Chels'), (3909, 'Anthael'), (3788, 'Baitn'), (3544, 'Michama'), (3426, 'Saftaro'), (3410, 'Slomana'), (3301, 'Haldena'), (3256, 'Blainte'), (3105, 'Gerleem'), (2357, 'Bhan'), (1117, 'Toicelize'), (721, 'Tyqueredaro')] Here's some female names for comparison: Kionnasha, Darenee, Khunia, Lalera, Ernet, Tifaela, Gersha, Yerie, Reaun, Kethi, Khylis, Wynniya, Jadahy, Sharal, Raili, Cheryet, Rosara, Caria Now, these names are from the US census, so they will be biased toward English names, but with various other ethnicities mixed in. But if you could get name lists based on a particular ethnicity, you could generate new names based on that list, and assign those names to a particular fantasy race. Or you could do it with names from a scientific dictionary, or a list of dinosaur names, or a list of names with a 'd' in them. [CODE]""" nomenclator.py Yet another fantasy name generator. """ import collections import random class Nomenclator(object): def __init__(self, word_list): # Parse the parts of the words. self.check = set(word_list) self.starts = collections.Counter() self.pairs = collections.defaultdict(collections.Counter) self.ends = collections.defaultdict(collections.Counter) self.lengths = collections.Counter() self.mean_length = 0 for word in word_list: word = word.strip() self.lengths[len(word)] += 1 self.mean_length += len(word) self.starts[word[0]] += 1 word = f'^{word}' for pair_ndx in range(len(word) - 2): self.pairs[word[pair_ndx:(pair_ndx + 2)]][word[pair_ndx + 2]] += 1 self.ends[word[-3:-1]][word[-1]] += 1 self.mean_length /= len(word_list) # Convert the data to a form usable by choices. self.starts = {'population': tuple(self.starts.keys()), 'weights': tuple(self.starts.values())} new_pairs = {} for pair in self.pairs: new_pairs[pair] = {'population': tuple(self.pairs[pair].keys()), 'weights': tuple(self.pairs[pair].values())} self.pairs = new_pairs new_ends = {} for almost in self.ends: new_ends[almost] = {'population': tuple(self.ends[almost].keys()), 'weights': tuple(self.ends[almost].values())} self.ends = new_ends self.lengths = {'population': tuple(self.lengths.keys()), 'weights': tuple(self.lengths.values())} def name(self): """Generate a new name. (str)""" while True: try: # Get a random start and length. name = '^' + random.choices(**self.starts)[0] length = random.choices(**self.lengths)[0] # Add letters based on the last two letters of the name. while len(name) < length: name += random.choices(**self.pairs[name[-2:]])[0] # Add a final character. name += random.choices(**self.ends[name[-2:]])[0] except KeyError: continue # Make sure that the name is new. name = name[1:] if name not in self.check: return name def names(self, n = 18, popularity = False): """ Generate a list of unique names. (list) Parameter: n: How many names to generate. (int) """ name_list = [] while len(name_list) < n: new_name = self.name() if new_name not in name_list: name_list.append(new_name) if popularity: name_list = [(self.popularity(name), name) for name in name_list] name_list.sort(reverse = True) return name_list def popularity(self, name): """ Get a normalized popularity score for a given name. (int) Parameters: name: A name that could be generated by this nomenclator. (str) """ len_score = self.lengths['weights'][self.lengths['population'].index(len(name))] ltr_score = self.starts['weights'][self.starts['population'].index(name[0])] name = f'^{name}' for ltr_ndx in range(len(name) - 3): ltrs = name[ltr_ndx:(ltr_ndx + 2)] weight_ndx = self.pairs[ltrs]['population'].index(name[ltr_ndx + 2]) ltr_score += self.pairs[ltrs]['weights'][weight_ndx] ltrs = name[-3:-1] ltr_score += self.ends[ltrs]['weights'][self.ends[ltrs]['population'].index(name[-1])] return int((ltr_score / (len(name) - 1)) * self.mean_length + len_score) if __name__ == '__main__': census = [] with open(r'..\Data\us-names-by-gender.csv') as name_file: for line in name_file: sex, name, count = line.split(',') if sex == 'F': census.append(name) n = Nomenclator(census) print(', '.join(n.names())) print(n.names(popularity = True)) [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*TTRPGs General
Non-evocative Names
Top