Sha256: bf717927a088f376d9c28ae0453296430a61798f414061925721d4246b6d5f42
Contents?: true
Size: 234 Bytes
Versions: 7
Compression:
Stored size: 234 Bytes
Contents
function wordcount(sentence::AbstractString) sentence = lowercase(sentence) words = Dict() for rx = eachmatch(r"[a-z]+'[a-z]+|[0-9a-z]+", sentence) word = rx.match words[word] = get(words, word, 0) + 1 end words end
Version data entries
7 entries across 7 versions & 1 rubygems