search for: edit_distance

Displaying 2 results from an estimated 2 matches for "edit_distance".

2011 Feb 03
0
[LLVMdev] Spell Correction Efficiency
...e older method in place, especially because I saw that it was used in FileCheck and was a bit wary of any side-effect I might introduce there. > > I have thus created a new method: unsigned StringRef::levenshtein_distance(StringRef other, unsigned maxEditDistance) and replace the two uses of edit_distance in Sema\SemaLookup.cpp with it. I would much rather just replace edit_distance completely. Compiler writers aren't string-savvy enough to pick between the two algorithms :) > I have ditched the "AllowReplace" argument since it further complicated the logic of an already ~150 line...
2011 Jan 15
2
[LLVMdev] Spell Correction Efficiency
...ve left the older method in place, especially because I saw that it was used in FileCheck and was a bit wary of any side-effect I might introduce there. I have thus created a new method: unsigned StringRef::levenshtein_distance(StringRef other, unsigned maxEditDistance) and replace the two uses of edit_distance in Sema\SemaLookup.cpp with it. I have ditched the "AllowReplace" argument since it further complicated the logic of an already ~150 lines method for no obvious gain (as far as I could see) and I have also explicited the computations a bit by using named temporaries. Unfortunately I hav...