RosettaCodeData/Task/Word-frequency/Factor/word-frequency.factor
2023-07-01 13:44:08 -04:00

6 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 .