I before E except after C: Difference between revisions

Content added Content deleted
m (added whitespace to the task's preamble.)
(Added PicoLisp)
Line 1,616: Line 1,616:
I before E except after C: NOT PLAUSIBLE</pre>
I before E except after C: NOT PLAUSIBLE</pre>


=={{header|PicoLisp}}==
<lang PicoLisp>(de ibEeaC (File . Prg)
(let
(Cie (let N 0 (in File (while (from "cie") (run Prg))))
Nie (let N 0 (in File (while (from "ie") (run Prg))))
Cei (let N 0 (in File (while (from "cei") (run Prg))))
Nei (let N 0 (in File (while (from "ei") (run Prg)))) )
(prinl "cie: " Cie)
(prinl "nie: " (dec 'Nie Cie))
(prinl "cei: " Cei)
(prinl "nei: " (dec 'Nei Cei))
(let (NotI (> (* 3 Cie) Nie) NotE (> Nei (* 3 Cei)))
(prinl
"I before E except after C: is"
(and NotI " not")
" plausible" )
(prinl
"E before I when after C: is"
(and NotE " not")
" plausible" )
(prinl
"Overall rule is"
(and (or NotI NotE) " not")
" plausible" ) ) ) )

(ibEeaC "unixdict.txt"
(inc 'N) )

(prinl)

(ibEeaC "1_2_all_freq.txt"
(inc 'N (format (last (split (line) "\t")))) )</lang>
Output:
<pre>cie: 24
nie: 466
cei: 13
nei: 217
I before E except after C: is plausible
E before I when after C: is not plausible
Overall rule is not plausible

cie: 994
nie: 8148
cei: 327
nei: 4826
I before E except after C: is plausible
E before I when after C: is not plausible
Overall rule is not plausible</pre>


=={{header|PowerShell}}==
=={{header|PowerShell}}==