[cfe-commits] [PATCH] Use several weighted factors to determine typo candidate viablity.

Kaelyn Uhrain rikka at google.com
Mon Feb 13 15:38:36 PST 2012


Replace the simple Levenshtein edit distance for typo correction
candidates--and the hacky way adding namespace qualifiers would affect
the edit distance--with a synthetic "edit distance" comprised of several
factors and their relative weights. This also allows the typo correction
callback object to convey more information about the viability of a
correction candidate than simply viable or not viable.
---
 include/clang/Sema/TypoCorrection.h                |   99 ++++++++++++++++---
 lib/Sema/SemaLookup.cpp                            |   77 +++++++--------
 ...issing-namespace-qualifier-typo-corrections.cpp |   21 ++++
 3 files changed, 139 insertions(+), 58 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-several-weighted-factors-to-determine-typo-candi.patch
Type: text/x-patch
Size: 17799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120213/da0c91d8/attachment.bin>


More information about the cfe-commits mailing list