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

7 lines
192 B
Factor
Raw Permalink Normal View History

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