I before E except after C: Difference between revisions

J
(J)
Line 15:
* [http://news.bbc.co.uk/1/hi/education/8110573.stm Schools to rethink 'i before e'] - BBC news, 20 June 2009
* [http://www.youtube.com/watch?v=duqlZXiIZqA I Before E Except After C] - [[wp:QI|QI]] Series 8 Ep 14, (humorous)
=={{header|J}}==
 
After downloading unixdict to /tmp:
 
<lang J> dict=:tolower fread '/tmp/unixdict.txt'</lang>
 
Investigating the rules:
 
<lang J> +/'cie' E. dict
24
+/'cei' E. dict
13
+/'ie' E. dict
490
+/'ei' E. dict
230</lang>
 
So, based on unixdict.txt, the "I before E" rule seems plausible (490 > 230 by more than a factor of 2), but the exception does not make much sense (we see almost twice as many i before e after a c as we see e before i after a c).
 
Note that if we looked at frequency of use for words, instead of considering all words to have equal weights, we might come up with a different answer.
 
=={{header|Python}}==
<lang python>import urllib.request
6,962

edits