RosettaCodeData/Task/Word-frequency/Factor/word-frequency.factor

7 lines
192 B
Factor

USING: ascii io math.statistics prettyprint sequences
splitting ;
IN: rosetta-code.word-count
lines " " join " .,?!:;()\"-" split harvest [ >lower ] map
sorted-histogram <reversed> 10 head .