Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 什么算法在拼写检查器中给出建议?
在旨在从文本文件中读取并为错误拼写单词提供建议的 C++ 程序中应该使用什么算法?
使用Levenshtein 距离:
http://thetechnofreak.com/technofreak/levenshtein-distance-implementation-c/ http://murilo.wordpress.com/2011/02/01/fast-and-easy-levenshtein-distance-using-a-trie-在-c/