Open peilinUWU opened 2 years ago
Using the given example:
insert_costs = np.ones(128, dtype=np.float64) insert_costs[ord('D')] = 1.5 print(lev('BANANAS', 'BANDANAS', insert_costs=insert_costs)) # prints '1.5'
We get a printout 1.5, no problem. If I change the cost to a higher value, say 5, then it prints 2.0. Am I missing something?
In this paricular case, it would be cheaper to substitute A -> D (cost 1), then insert the A back (cost 1), yielding a lower cost of 2:
Edited: Thanks that makes sense!
Using the given example:
We get a printout 1.5, no problem. If I change the cost to a higher value, say 5, then it prints 2.0. Am I missing something?