I before E except after C: Difference between revisions
Content added Content deleted
(Added Wren) |
(→{{header|Wren}}: Doh, 7 'awkward' words in fact.) |
||
Line 3,343: | Line 3,343: | ||
It's a moot point whether one should include words beginning with "ei" or "ie" in this analysis as I've certainly never applied the rule to them and there are clearly a lot more of the former than the latter (22 to 1 for unixdict.txt). Despite this reservation I've included them anyway. |
It's a moot point whether one should include words beginning with "ei" or "ie" in this analysis as I've certainly never applied the rule to them and there are clearly a lot more of the former than the latter (22 to 1 for unixdict.txt). Despite this reservation I've included them anyway. |
||
Also there are |
Also there are seven words which fall into two categories and which have therefore been double-counted. |
||
<lang ecmascript>import "io" for File |
<lang ecmascript>import "io" for File |
||
import "/pattern" for Pattern |
import "/pattern" for Pattern |
||
Line 3,366: | Line 3,366: | ||
System.print("and so are counted more than once:") |
System.print("and so are counted more than once:") |
||
for (word in words) { |
for (word in words) { |
||
var tc1 = count1 + count2 + count3 + count4 |
var tc1 = count1 + count2 + count3 + count4 + count5 + count6 |
||
if (p1.isMatch(word)) count1 = count1 + 1 |
if (p1.isMatch(word)) count1 = count1 + 1 |
||
if (p2.isMatch(word)) count2 = count2 + 1 |
if (p2.isMatch(word)) count2 = count2 + 1 |
||
Line 3,373: | Line 3,373: | ||
if (word.startsWith("ie")) count5 = count5 + 1 |
if (word.startsWith("ie")) count5 = count5 + 1 |
||
if (word.startsWith("ei")) count6 = count6 + 1 |
if (word.startsWith("ei")) count6 = count6 + 1 |
||
var tc2 = count1 + count2 + count3 + count4 |
var tc2 = count1 + count2 + count3 + count4 + count5 + count6 |
||
if ((tc2 -tc1) > 1) System.print(" " + word) |
if ((tc2 -tc1) > 1) System.print(" " + word) |
||
} |
} |
||
Line 3,401: | Line 3,401: | ||
The following words fall into more than one category |
The following words fall into more than one category |
||
and so are counted more than once: |
and so are counted more than once: |
||
eightieth |
|||
einstein |
|||
einsteinian |
|||
einsteinium |
|||
liechtenstein |
liechtenstein |
||
meier |
meier |