基于虚尾白空间无关Levenshtein距离的明文表检测
Imagined-Trailing-Whitespace-Agnostic Levenshtein Distance For Plaintext Table Detection
摘要:
Levenshtein距离的标准算法将尾随空格视为任何其他字母或符号。然而,当人类比较2个字符串时,我们隐含地假设两个字符串都由无限的尾随空格填充。这告诉我们插入、删除和替换的成本应该是多少。这种违反我们预期的行为会导致非直观的编辑距离值。为了解释这种特定的人类直觉,考虑尾随空格的“所有可能”子串的天真方法将产生$O(n^3)$算法。在这项工作中,我们提供了一个有效的$O(n^2)$算法来计算相同的。关键词:想象的无限尾随空白,人性化,直观的编辑距离,表检测,表对齐
英文摘要:
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
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。