CoRnInEsS, CoRnS, CORnS, CoRnY, CORnY, CoRuSCaTe, CoRuScAtEs, CoS, COs, COS, CoSH, COsH, COSH, CoSHEs, COsHeS, COsHEs, COSHEs, CoSiNe, CoSINe, COsINe, COSiNe, COSINe, CoSiNeS, CoSiNEs, CoSInEs, CoSINEs, COsInEs, COsINeS, COsINEs, COSiNeS, COSiNEs, COSInEs, CoSmIC, CoSmOs, CoSmOS, COsMoS, COSmOs, CoSmOsEs, CoSmOSeS, CoSmOSEs, COsMoSeS, COsMoSEs, COSmOsEs, CoSTlIEr, COsTlIEr, CoSTlY, COsTlY, COSTlY, CoTe, COTe, CoTeS, COTeS, CoUCH, CoUCHeS, CoUCHEs, CoULiS, COULiS, CoUNTiEs, CoUP, COUP, CoUPEs, COUPEs, CoUPoN, CoUPON, COUPoN, CoUPoNS, CoUPS, COUPS, CoURaGe, COURaGe, CoUSiN, CoUSIn, CoUSIN, COUSiN, COUSIn, CoUSiNS, CoVEr, COVEr, CoVErS, COVErS, CoVErTlY, CoVEs, COVEs, CoW, COW, CoWArDs, COWArDs, CoWBIrDs, CoWBOY, CoWEr, COWEr, CoWErS, COWErS, CoWHErDs, CoWLiCK, CoWPAt, COWPAt, CoWPAtS, CoWPoKEs, CoWS, COWS, CoWSHeDs, CoWSLiP, CoXeS, COXeS, CoY, COY, CoYEr, COYEr, CoYNEsS, CoYOTe, CoYOTeS, CoYPu, CoYPU, COYPu, COYPU, CoYPuS, CoYPUS, COYPuS, CPd, CPS, CRaB, CRaBBiEr, CRaBS
A (partial but pretty extensive) list of words that can be made from the elements in the periodic table – source code here and below, the entire list available here.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
''' EVERY WORD IN THE PERIODIC TABLE Jeff Thompson | 2013 | www.jeffreythompson.org Takes as its input the abbreviations of the elements in the periodic table and returns all possible words that can be generated from that input*. Idea occurred while sitting through a boring meeting in a lecture hall, staring at a periodic table on the wall. * Well, probably not every word, but many-to-most. The longest word generated (because that's how the code in the docs works and in order to prevent the program from running forever) will be as long as the # of items in the list + 1. There are 118 elements at 343 total characters, so that is the longest possible word that can be created. REQUIRES: + Enchant and PyEnchant for spell checking - first install Enchant using Homebrew - then install PyEnchant from the prebuilt binary ''' from itertools import chain, permutations import enchant elements = [] # list of all input elements words = [] # output list of words numPermutations = 0 # count the # of permutations created dict = enchant.Dict('en_US') # load US English dictionary - change to try in other languages... # POWERSET FUNCTION # generates all permutations of all lengths, via Itertools docs def powerset(iterable): s = list(iterable) return chain.from_iterable(permutations(s, r) for r in range(len(s)+1)) # LOAD ELEMENTS INTO LIST with open('PeriodicTable.txt') as file: for element in file: elements.append(element.strip()) # ITERATE COMBINATIONS, CHECK AGAINST DICTIONARY # this is where the magic happens :) print '\n\n\nChecking all combinations...\n' for perm in powerset(elements): # iterate the powerset numPermutations += 1 # count permutations as we go word = ''.join(perm) # convert tuple to string if word != '' and dict.check(word.lower()): # check spelling (must be lowercase) words.append(word) # if a word, add to list... print '>> ' + word # ...and print the result # WRITE RESULTING WORDS TO FILE with open('PeriodicTableWords.txt', 'a') as file: for word in words: file.write(word + '\n') # ALL DONE! print '\n' + 'ALL DONE!' print 'Created ' + str(len(words)) + ' words from ' + str(numPermutations) + ' permutations.' print '\n\n\n\n\n\n' |
“Irrational” doesn’t appear on the list…?!
You forgot catalina
My list doesn’t include proper nouns :)