⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editdist2.hpp

📁 unix/linux下拼写检查程序源码
💻 HPP
字号:
#include "leditdist.hpp"#include "editdist.hpp"#include <cassert>namespace aspeller {  inline int edit_distance(const char * a, const char * b, 			   int level, // starting level			   int limit, // maximum level			   const EditDistanceWeights & w 			   = EditDistanceWeights())   {    int score;    assert(level > 0  && limit >= level);    do {      if (level == 2) {	score = limit2_edit_distance(a,b,w);      } else if (level < 5) {	score = limit_edit_distance(a,b,level,w);      } else {	score = edit_distance(a,b,w);      }      ++level;    } while (score >= LARGE_NUM && level <= limit);    return score;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -