Fun with words
Vowels in Australian placenames
In the state of Victoria, Australia, there is a town called called Euroa. Like many Australian place names with lots of vowels, this name is taken from a local Aboriginal word; this one means “joyful”.
A friend of mine staying there pointed out that the name had four vowels, which led us to wonder what Australian place names had either any four vowels (either once each, or each repeated the same number of times), or all five vowels, again either once each or each repeated the same number of times.
I downloaded a list from geonames.org; the Australian list contains 215381 names, although some of them are misspellings (such as “Soliders Road” for “Soldiers Road”). This can be saved as a list using Python’s file reading capabilities. (The zip file provided by geonames contains a file called “AU.txt” which is supposed to be a tab-delimited table, but when read in using Pandas, the columns don’t properly line up. So I used the place names only.)
We can read in the table and remove duplicate names:
import pandas as pd
temp = pd.read_table('AU.txt',sep='\t',header=None)
AU = list(temp[1].drop_duplicates())
AUn = [x for x in AU if not(' ' in x)]
(The temp command will produce an error about columns having mixed types.
I just ignored it.) The list AUn contains only names without spaces; that is,
names consisting of just one word
The list AU now has only 155593 names (but still including misspellings.) And
AUn contains 31712 names. The longest one-word name is
‘Mamungkukumpurangkuntjunya’. Read all about it on wikipedia.
From this list AU of names we can create a new list including the vowels:
nv = []
for n in AU:
v = ''.join(sorted([x for x in n.upper() if x in 'AEIOU']))
nv += [[n,v]]
Then, for example
from random import sample
sample(nv,10)
produces something like
[['Seven Mile Beach National Park', 'AAAAEEEEIIO'],
['Mooroopna', 'AOOOO'],
['Camp Wharf', 'AA'],
['Leewardja Waterhole', 'AAAEEEEO'],
['Art Series - The Cullen', 'AEEEEIU'],
['Koodnanie Hill', 'AEIIOO'],
['Mount Coryah', 'AOOU'],
['Ellerslie', 'EEEI'],
['Stephensdale Bay', 'AAEEE'],
['North Point Cays', 'AIOO']]
Now for the fun part:
Any four vowels
Start with
v4s = ['AEIO', 'AEIU', 'AEOU', 'AIOU', 'EIOU']
(This can be created using combinations, but takes even more keystrokes.)
Then
four_vowels = [x[0] for x in nv if x[1] in v4s]
This list has 5225 elements, and you can see a few by sampling:
print(sample(four_vowels,10))
['Pundin Soak', 'Vik-Era Stud', 'Dan Rivulet', 'Ellinora', 'Young River', 'Bulchina Well',
'Sandon River', 'Eukaby Hill', 'Seymour Park', 'Dolphin Beach']
We can do the same thing for one-word placenames:
four_vowels_n = [x[0] for x in nv if x[1] in v4s and not(' ' in x[0]]]
print(sample(four_vowels_n,10))
print(len(four_vowels_n))
['Annuello', 'Warorview', 'Colinvale', 'Tamborine', 'Glenorina', 'Burajige',
'Husingore', 'Boinbrae', 'Talbotville', 'Mulgabbie']
853
We can now, for example, find the longest and shortest such names:
len4n = list(map(len,four_vowels_n))
mx,mn = max(len4n),min(len4n)
print([x for x in four_vowels_n if len(x)==mx])
print([x for x in four_vowels_n if len(x)==mn])
['Brighton-Le-Sands']
['Euroa', 'Youie', 'Euola', 'Euora']
All five vowels
This is now straightforward
all_vowels = [x[0] for x in nv if x[1]=='AEIOU']
all_vowels_n = [x for x in all_vowels if not(' ' in x)]
print(all_vowels_n)
['Pantoulbie', 'Dalhousie', 'Courtabie', 'Youanmite', 'Orandumbie', 'Moulamein',
'Mauriceton', 'Faulconbridge', 'Euramilong', 'Burrabogie', 'Angourie', 'Ucharonidge',
'Mourambie', 'Kakodbebuldi', 'Youngerina', 'Murrawombie', 'Eudoia', 'Illouera',
'Wrattonbullie', 'Mandidoune', 'Speculation', 'Laurieston', 'Courallie',
'Droubalgie', 'Bullaworrie', 'Broulaside', 'Boucawie', 'Mourabie', 'Elouia',
'Pandemonium', 'Yalpoudnie', 'Owiegunya', 'Ramorunie', 'Euromina', 'Aurielton']
The longest name in this list is ‘Wrattonbullie’ and the shortest is ‘Eudoia’. The last is a locality in the city of Toowoomba, in the state of Queensland.
Here are a few more experiments; first double vowels:
doubled_vowels = [x[0] for x in nv if x[1]=='AAEEIIOOUU']
doubled_vowels_n = [x for x in all_vowels if not(' ' in x)]
for w in doubled_vowels:
print(w)
Comfort Inn Augusta Westside
Little Square Top Mountain
Number One Kullingobinya Dam
Pandiburra Oil Bore Number 1
Lido Boutique Apartments
Quakers Hill East Public School
There are no place names with tripled vowels, but an honourable mention goes to:
[x[0] for x in nv if x[1] == 'AAAEEEIIIOOUUU']
['Edith Cowan University Mount Lawley Campus']
Finally, words with only one vowel (but repeated):
one_vowel = [x[0] for x in nv if len(set(x[1])) == 1 and not(' ' in x[0])]
mx = max(len(w) for w in one_vowel)
[w for w in one_vowel if len(w) == mx]
['Woodstock-on-Loddon']
one_vowel_n [x[0] for x in nv if len(set(x[1])) == 1 and not(' ' in x[0]) and not('-' in x[0])]
mx_n = max(len(w) for w in one_vowel_n)
[w for w in one_vowel_n if len(w) == mx_n]
['Napanadlaadlara',
'Mangayangadanha',
'Mattawarrangala',
'Nakkalamndjarda',
'Yampatjataranya']
The joy and delight of Aboriginal place-names!
Wordle starters
One way of starting Wordle is with two words which contain all the vowels between them, and whose other letters are common ones. To find such word pairs, we can download a list of Wordle solutions from kaggle .
from random import sample
import pandas as pd
temp = pd.read_csv('wordle_valid_solutions.csv')
words = list(temp['word'])
. Now find the most common letters used in these words:
allwords = ''.join(words)
freqs = dict()
alph = 'abcdefghijklmnopqrstuvwxyz'
for x in alph:
freqs[x] = allwords.count(x)
sorted_freqs = dict(sorted(freqs.items(), key=lambda item: item[1],reverse = True))
list(sorted_freqs.keys())[:10]
['e', 'a', 'r', 'o', 't', 'l', 'i', 's', 'n', 'c']
We only want 10 letters as that’s all we can use in two words. Note that this list contains neither ‘u’ nor ‘y’ (treating ‘y’ as a vowel in this context). So we replace the last two letters.
commons = ''.join(sorted('earotlisuy'))
N = len(words)
all_vowels = []
for i in range(N):
for j in range(i,N):
if ''.join(sorted(words[i]+words[j])) == commons:
all_vowels += [[words[i],words[j]]]
print(all_vowels)
[['irate', 'lousy'], ['royal', 'suite']]
So there you are. One way of starting Wordle is with either of the pairs
IRATE and LOUSY, or ROYAL and SUITE.