Handbook
Glossary
complete ( full short -- score )
Fuzzy completion
Prev:
score ( full fuzzy -- n )
Next:
rank-completions ( results -- newresults )
Vocabulary
tools
.
completion
Inputs
full
a
string
short
a
string
Outputs
score
a rational number between 0 and 1
Word description
Ranks how close
short
is to
full
by edit distance.
Definition
USING:
kernel
math
math.order
sequences
;
IN:
tools.completion
:
complete
( full short -- score )
[
dupd
fuzzy
score
]
2keep
pick
0
>
[
[
<reversed>
]
bi@
dupd
fuzzy
score
max
]
[
2drop
]
if
;