Skip to main content
QUICK REVIEW

[论文解读] Misspelling Correction with Pre-trained Contextual Language Model

Yifei Hu, Xiaonan Jing|arXiv (Cornell University)|Jan 8, 2021
Topic Modeling参考文献 27被引用 4
一句话总结

本文提出一种基于 BERT 掩码语言建模能力与编辑距离相结合的上下文拼写纠错方法。结果表明,未经微调的预训练 BERT 通过利用上下文嵌入和编辑距离,能够有效纠正非词汇词错误和真实词汇错误,在非正式来源的嘈杂、多错误句子中也表现出稳健性能。

ABSTRACT

Spelling irregularities, known now as spelling mistakes, have been found for several centuries. As humans, we are able to understand most of the misspelled words based on their location in the sentence, perceived pronunciation, and context. Unlike humans, computer systems do not possess the convenient auto complete functionality of which human brains are capable. While many programs provide spelling correction functionality, many systems do not take context into account. Moreover, Artificial Intelligence systems function in the way they are trained on. With many current Natural Language Processing (NLP) systems trained on grammatically correct text data, many are vulnerable against adversarial examples, yet correctly spelled text processing is crucial for learning. In this paper, we investigate how spelling errors can be corrected in context, with a pre-trained language model BERT. We present two experiments, based on BERT and the edit distance algorithm, for ranking and selecting candidate corrections. The results of our experiments demonstrated that when combined properly, contextual word embeddings of BERT and edit distance are capable of effectively correcting spelling errors.

研究动机与目标

  • 探究预训练 BERT 是否能在不进行微调的情况下,有效纠正上下文中的拼写错误。
  • 评估将 BERT 的上下文嵌入与编辑距离结合用于排序纠错候选的实效性。
  • 评估 BERT 在纠正包含多个错误或非正式语言的句子中的拼写错误时的鲁棒性。
  • 探索 BERT 作为通用模型纠正拼写之外其他类型语言错误的潜力。
  • 考察将 BERT 扩展为在单一流程中同时检测和纠正拼写错误的可行性。

提出的方法

  • 利用 BERT 的掩码标记预测生成拼写错误词的候选纠正结果。
  • 通过编辑距离(如 Levenshtein 距离)在较小阈值(≤2)内生成候选纠正结果。
  • 根据 BERT 在掩码标记位置对每个候选结果的预测概率对候选结果进行排序。
  • 选择概率最高的候选结果作为最终纠正结果。
  • 在包含多个错误的现实世界非母语英语文本上测试该方法,包括非正式语言和标点符号噪声。
  • 使用标准指标进行评估,将非词汇词错误和真实词汇错误统一在同一个框架下处理。

实验结果

研究问题

  • RQ1BERT 的掩码语言建模能力是否能在不进行微调的情况下有效纠正上下文中的拼写错误?
  • RQ2将 BERT 的上下文嵌入与编辑距离结合,相比单独使用任一方法,能否显著提升纠正准确率?
  • RQ3BERT 在纠正包含多个错误或非正式语言的句子中的拼写错误时,其鲁棒性如何?
  • RQ4该框架是否能有效纠正非词汇词错误和真实词汇错误?
  • RQ5是否可行将 BERT 扩展为在单一统一流程中同时检测和纠正拼写错误?

主要发现

  • BERT 仅使用其预训练权重,在无需任何微调的情况下即表现出强大的拼写纠错性能。
  • BERT 的上下文预测与编辑距离的结合显著提升了纠错准确率,优于基线方法。
  • BERT 即使在包含多个错误和非正式语言的句子中也能成功纠正拼写错误,表现出高度鲁棒性。
  • 该方法有效纠正了非词汇词错误(如 'acsese' → 'access')和真实词汇错误(如 'exibitions' → 'exhibitions')。
  • BERT 能够在语法和标点不一致的复杂、嘈杂社交媒体风格文本中正确预测纠正结果。
  • 该方法在将其他错误类型(如句法错误)转化为掩码预测任务方面展现出良好的泛化潜力。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。