LetterCounts¶
Returns an association mapping each letter to its number of occurrences.
With a second argument it counts letter n-grams; non-letters break the window.
A list of strings threads, giving one association per string.
$ wo 'LetterCounts[{"hello", "world", "!"}]'
{<|l -> 2, o -> 1, e -> 1, h -> 1|>, <|d -> 1, l -> 1, r -> 1, o -> 1, w -> 1|>, <||>}
The n-gram length has to be a positive whole number: