Word frequency count FIXED by murky-satyr

for(s='';l=readline(d={});)s+=l
for([,c]in s.toLowerCase().replace(/[!-`~]/g,'').match(/\S+/g).sort())d[c]=-~d[c]
for([w,n]in d)print(n,w)

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

download

return to the top page