Text completion: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→Sorenson-Dice: fewer intermediates) |
Thundergnat (talk | contribs) m (→Sorenson-Dice: stabilize the returned sort order) |
||
Line 560: | Line 560: | ||
# Testing |
# Testing |
||
for |
for <complition inconsqual Sørenson> -> $w { |
||
say "\n$w:"; |
say "\n$w:"; |
||
.say for sorenson($w, %hash).grep(*.[0] >= .55).sort(- |
.say for sorenson($w, %hash).grep(*.[0] >= .55).sort({-.[0],~.[1]}).head(10); |
||
}</lang> |
}</lang> |
||
Line 568: | Line 568: | ||
<pre>complition: |
<pre>complition: |
||
[0.778 completion] |
[0.778 completion] |
||
⚫ | |||
[0.737 competition] |
[0.737 competition] |
||
⚫ | |||
[0.706 coalition] |
[0.706 coalition] |
||
[0.7 incompletion] |
[0.7 incompletion] |
||
⚫ | |||
[0.667 complexion] |
[0.667 complexion] |
||
[0.667 complicity] |
[0.667 complicity] |
||
⚫ | |||
[0.632 compilation] |
[0.632 compilation] |
||
[0.632 |
[0.632 compunction] |
||
inconsqual: |
inconsqual: |
||
Line 589: | Line 589: | ||
[0.667 benson] |
[0.667 benson] |
||
[0.615 swenson] |
[0.615 swenson] |
||
[0.571 |
[0.571 evensong] |
||
[0.571 |
[0.571 sorensen]</pre> |
||
=={{header|REXX}}== |
=={{header|REXX}}== |