Word frequency count FIXED by murky-satyr

a:=list
File standardInput contents lowercase foreach(c,if(c==32or c>96and c<123,a push(c asCharacter))a)join split map(v,Map atPut(v,if(e:=Map at(v),e+1,1));v)unique sort map(v,v>""and writeln(Map at(v)," ",v))

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page