Sha256: d48e21abefaec771e8a21ba9d0aa67eefdb460ed4315784da2540911a9aa32d5
Contents?: true
Size: 252 Bytes
Versions: 311
Compression:
Stored size: 252 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
311 entries across 311 versions & 1 rubygems