HF RL Explorer

text statistics: add cli flag

text statistics: add cli flag: a task in smol-software-harbor (Harbor dataset). Add a --top N option to bin/wc.js : after the usual summary line, print the N most frequent words (as computed by words() ), one per line as word count , most frequent first and ties in alphabetical order. Without…

The task

Add a `--top N` option to `bin/wc.js`: after the usual summary line, print the `N` most frequent words (as computed by `words()`), one per line as `word count`, most frequent first and ties in alphabetical order. Without `--top` the output is unchanged. Example: `node bin/wc.js sample.txt --top 2` prints the summary…

Part of efederici/smol-software-harbor.