Word frequency: Difference between revisions

m
→‎{{header|Wren}}: Minor tidy and rerun
(K)
m (→‎{{header|Wren}}: Minor tidy and rerun)
 
Line 5,437:
I've taken the view that 'letter' means either a letter or digit for Unicode codepoints up to 255. I haven't included underscore, hyphen nor apostrophe as these usually separate compound words.
 
Not very quick (runs in about 4715 seconds on my system) though this is partially due to Wren not having regular expressions and the string pattern matching module being written in Wren itself rather than C.
 
If the Go example is re-run today (2117 OctoberFebruary 20202024), then the output matches this Wren example precisely though it appears that the text file has changed since the former was written more than 25 years ago.
<syntaxhighlight lang="ecmascriptwren">import "io" for File
import "./str" for Str
import "./sort" for Sort
import "./fmt" for Fmt
import "./pattern" for Pattern
 
var fileName = "135-0.txt"
9,485

edits