Word frequency count FIXED by tabasa

k=(a=(gets(p).downcase.split(/[\s,~\(\)\"\*]+/).map{|m|m.gsub(/[^a-z]/,"")}-[""]).sort).uniq\x0d
k.each{|i|n=0;a.each{|c|n+=1 if c==i};puts "#{n} #{i}"}

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

download

return top