Anonymous user
Word frequency: Difference between revisions
no edit summary
m (→{{header|Phix}}: added syntax colouring the hard way) |
No edit summary |
||
Line 2,176:
Var L=loadfile("rosettalesmiserables.txt")
L=lcase(L)
'get deliminators
for n as long=1 to 96
Line 2,187 ⟶ 2,188:
string_split(L,deliminators,s())
quicksort(s(),lbound(s),ubound(s))
Line 2,208 ⟶ 2,205:
print "frequency","word"
print
for n as long=lbound(t) to lbound(t)+
print t(n).l,t(n).s
next
Line 2,219 ⟶ 2,216:
<pre>
I saved and reloaded the file as ascii text.
frequency word
▲time for operation 1.11089929996524 seconds
</pre>
|