Three Letter Words

If I pick three letters at random, what are the chances I spell an English word?

It took an unfortunate amount of time getting the PyEnchant spellchecking library to install properly, but soon after I had a neat Python script designed to look up three letter words.

import enchant
import string

alphabet = string.lowercase
en = enchant.Dict("en_US")

w,t = 0,0

for a in alphabet:
	for b in alphabet:
		for c in alphabet:
			t = t+1
			if en.check(a+b+c):
				w = w+1

print w,t,float(w)/t

The script found 783 three-letter words out of 17,756 possible three-letter arrangements. That’s about 4.5%!

It was a simple matter to modify the script for four-letter words. Only about 0.6% of 456,976 four-letter arrangements are words in American English.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>