计算机科学 > 数据结构与算法
[提交于 2021年3月11日]
标题:Imagined-Trailing-Whitespace-Agnostic Levenshtein Distance For Plaintext Table Detection
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:The standard algorithm for Levenshtein distance, treats trailing whitespace the same as any other letter or symbol. However, when humans compare 2 strings, we implicitly assume that both strings are padded by infinite trailing whitespace. This informs our expectations for what the costs for insertion, deletion and replacement, should be. This violation of our expectations results in non-intuitive edit distance values. To account for this specific human intuition, a naive approach which considers "all possible" substrings of trailing whitespace would yield an $O(n^3)$ algorithm. In this work, we provide an efficient $O(n^2)$ algorithm to compute the same. Keywords: Imagined Infinite Trailing Whitespace, Human Friendly, Intuitive Edit Distance, Table Detection, Table Alignment
提交历史
来自:Kartik Vempala[v1] 2021年3月11日 星期四 20:39:40 UTC