j*******e 发帖数: 48 | 1 I want to calculate the edit distance between two words, I penalize
insertion, deletions and substitution by 1 unit. My question is, for some
substitutions, for example, "a", its closest neighbors "q, s , z", it is
substitution cost will be 0.5. I have a txt file which contain all the pairs
whose substitution cost will be 0.5, how to write these cost in perl? I
have the code for the cost=1 case, do not know how to modify the code to
include the new substitution case. Thank you!
below is the perl | j*******e 发帖数: 48 | 2 please give me some idea, I really appreciate!! |
|