RosettaCodeData/Task/Word-frequency/Nu/word-frequency.nu

9 lines
341 B
Text
Raw Permalink Normal View History

2025-06-11 20:16:52 -04:00
def lesm [] {
let corp = open --raw 'LES_MISÉRABLES.txt' | str downcase | split words | wrap corp
let stop = [i a an and are as at be by for from how in is it of on or that the this to was what when where who will with the] | wrap stop
let tidy = $corp | where corp in $stop.stop == false
$tidy | histogram value
}
lesm | first 20