L25 Spell Correction

用户输入input, 候选词 candidates

分为两个场景:1.错别字 2.不是错别字,但不适合 I am go(going) home

编辑距离(edit distance) 很经典的DP算法,很容易被考
1.insert
2.delete
3.replace
Spell Correction| (NLP L25-30笔记)
伪代码:
for word in dic:
edit_dist(word, currentword) #计算编辑距离
return best_candidate

DP算法的核心思想:
Big Problem = > Smaller Problem

Spell Correction| (NLP L25-30笔记)
Spell Correction| (NLP L25-30笔记)
edit_dist:计算Spell Correction| (NLP L25-30笔记)
Spell Correction| (NLP L25-30笔记)

DP学习:十个问题仔细看。
Spell Correction| (NLP L25-30笔记)

相关文章:

  • 2022-12-23
  • 2022-01-05
  • 2021-11-24
  • 2021-07-08
  • 2021-09-02
  • 2021-08-21
猜你喜欢
  • 2021-11-29
  • 2021-05-20
  • 2021-10-09
  • 2021-08-28
  • 2021-08-08
  • 2021-09-06
相关资源
相似解决方案