complete ( full short -- score )
Fuzzy completion
Prev:score ( full fuzzy -- n )
Next:rank-completions ( results -- newresults )


Vocabulary
tools.completion

Inputs and outputs
fulla string
shorta string
scorea rational number between 0 and 1


Word description
Ranks how close short is to full by edit distance.

Definition
USING: kernel math.order sequences ;

IN: tools.completion

: complete ( full short -- score )
[ dupd fuzzy score ] 2keep [ <reversed> ] bi@ dupd fuzzy
score max ;