On Mon Jun 1 2015 Barak A. Pearlmutter wrote: > To put a slightly different perspective on this, I have a sizable > bbdb file, and sometimes I can't find someone because I'm spelling > their name wrong. Maybe Steven vs Stephen. The classic way to deal > with this is to do a SOUNDEX search, or one of its successors. > > A hook here would be useful for this purpose. It wouldn't make > sense to redefine string-match though. Perhaps there should be a > standard string-match-loose which is used for > potentially-approximate matches like this and which has a double > handful of configuration options and tweaks that can be fiddled > with by prefixes in the search string.
This is interesting, though it might go in a somewhat different direction than what the OP had in mind who, I believe, was concerned that typing Chinese names can be cumbersome so that he wanted an ascii-based shortcut. GNU Emacs comes with lisp/soundex.el (for many years). Yet probably this does not solve problems with other languages. It seems to me that soundex was designed for English only. Every language has its own phonetic rules. The algorithms listed by Wikipedia http://en.wikipedia.org/wiki/Phonetic_algorithm are all for the English language, except for one algorithm for German. There is also http://en.wikipedia.org/wiki/Approximate_string_matching Again, all this is not specific to BBDB either. It can probably be useful for various emacs packages. But BBDB is probably one of them. Any approximate search will give you yet more matches than what you get otherwise. So it might not always simplify life if you have a large BBDB file. Therefore, exact and approximate search tools should probably exist in parallel. ------------------------------------------------------------------------------ _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/