Talk:Levenshtein distance: Difference between revisions

Content added Content deleted
(detailed data is different with bug fix)
m (J: change narrative comments to track bug fix)
Line 81: Line 81:
{. 1 3 1 2 NB. find if current character matches
{. 1 3 1 2 NB. find if current character matches
1
1
<./3 1 2 NB. find cheapest of previous delete, insert or substitute
1 1, 1 NB. find edit cost delta from previous edit costs
1
1
1 + 1 NB. add cost of fixing current character to cheapest previous edit
1 1 1+3 1 2 NB. find edit costs from adjacent states to this state
4 2 3
<./4 2 3 NB. find cheapest of previous delete, insert or substitute
2
2
1&{1 3 1 2 NB. retain current delete cost to be used as next substitute cost
1&{1 3 1 2 NB. retain current delete cost to be used as next substitute cost