Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -0,0 +1,3 @@
File.open("les_miserables.txt") do |f|
pp f.each_char.select(&.letter?).tally.to_a.sort_by {|k,v| -v}
end

View file

@ -1,8 +1,8 @@
val countLetters = fn(s) {
for[={:}] s2 in split(replace(s, RE/\P{L}/)) {
for[={:}] s2 in split(replace(s, by=RE/\P{L}/)) {
_for[s2; 0] += 1
}
}
val counts = countLetters(readfile("./fuzz.txt"))
writeln join("\n", map(fn(k) { "{{k}}: {{counts[k]}}" }, keys(counts)))
writeln join(map(keys(counts), by=fn(k) { "{{k}}: {{counts[k]}}" }), by="\n")