Skip to content

Instantly share code, notes, and snippets.

@cirops
Created March 27, 2019 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cirops/5a2b156958c12fca3b5b597cc3060080 to your computer and use it in GitHub Desktop.
Save cirops/5a2b156958c12fca3b5b597cc3060080 to your computer and use it in GitHub Desktop.
# Silly code to generate all combinations of species, background and gods that spell english words (according to NLTK)
# for Dungeon Crawl Stone Soup (as of 0.23)
from nltk.corpus import words
species = [
"Ba",
"Ce",
"DD",
"DE",
"Dg",
"Ds",
"Dr",
"Fe",
"Fo",
"Gr",
"Gh",
"Gn",
"Ha",
"HO",
"Hu",
"Ko",
"Mf",
"Mi",
"Mu",
"Na",
"Op",
"Og",
"Sp",
"Te",
"Tr",
"Vp",
"VS"
]
roles = [
"Fi",
"Gl",
"Mo",
"Hu",
"As",
"Be",
"AK",
"CK",
"Sk",
"En",
"Tm",
"AM",
"Wr",
"Wz",
"Cj",
"Su",
"Ne",
"FE",
"IE",
"AE",
"EE",
"VM",
"Ar",
"Wn"
]
gods = [
"A", "As", "Ash",
"B", "Be", "Beo",
"C", "Ch", "Che", "Chei",
"D", "Di", "Dit", "Dith",
"E", "El", "Ely",
"F", "Fe", "Fed",
"G", "Go", "Goz",
"H", "He", "Hep",
"J", "Ji", "Jiy",
"K", "Ki", "Kik", "Kiku",
"L", "Lu", "Lug",
"M", "Ma", "Mak",
"N", "Ne", "Nem",
"O", "Ok", "Oka",
"Q", "Qa", "Qaz",
"R", "Ru",
"S", "Si", "Sif",
"T", "Tr", "Tro", "Trog",
"U", "Us", "Usk",
"V", "Ve", "Veh",
"W", "Wu", "Wuj",
"X", "Xo", "Xom",
"Y", "Yr", "Yre", "Yred",
"Z", "Zi", "Zin",
"TSO", "Tsh"
]
for s in species:
for r in roles:
for g in gods:
if (s+r+g).lower() in set(words.words()):
print(s+r+g)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment