Jump to content

Text completion: Difference between revisions

m
→‎Sorenson-Dice: stabilize the returned sort order
m (→‎Sorenson-Dice: fewer intermediates)
m (→‎Sorenson-Dice: stabilize the returned sort order)
Line 560:
 
# Testing
for '<complition', 'inconsqual', 'Sørenson'> -> $w {
say "\n$w:";
.say for sorenson($w, %hash).grep(*.[0] >= .55).sort({-*.[0],~.[1]}).head(10);
}</lang>
 
Line 568:
<pre>complition:
[0.778 completion]
[0.737 composition]
[0.737 competition]
[0.737 composition]
[0.706 coalition]
[0.7 incompletion]
[0.667 decomposition]
[0.667 complexion]
[0.667 complicity]
[0.667 decomposition]
[0.632 compilation]
[0.632 computationcompunction]
 
inconsqual:
Line 589:
[0.667 benson]
[0.615 swenson]
[0.571 sorensenevensong]
[0.571 evensongsorensen]</pre>
 
=={{header|REXX}}==
10,333

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.