Word frequency: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 2,798:
[https://www.lua.org/manual/5.3/manual.html#pdf-string.gmatch gmatch]
[https://www.lua.org/manual/5.3/manual.html#6.4.1 patterns like %a]
 
=={{header|Mathematica}} / {{header|Wolfram Language}}==
<lang Mathematica>TakeLargestBy[Tally@StringCases[ToLowerCase@Import["https://www.gutenberg.org/files/135/135-0.txt",CharacterEncoding->"UTF-8"],RegularExpression@"\\w+"],Last,10]</lang>
{{out}}
<pre>{{the,41045},{of,19953},{and,14939},{a,14527},{to,13942},{in,11210},{he,9646},{was,8620},{that,7922},{it,6659}}</pre>
 
=={{header|MATLAB}} / {{header|Octave}}==
1,111

edits