Daily Tech Briefing
AI 科技速览
每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。
Dev.to AI · 2026/8/4 03:31:52
Why a Scan Is Not a Document
AI 中文解读
扫描件不等于文档,这是个反常识却重要的提醒。现在OCR(文字识别)技术越来越强,能把图片里的字清楚认出来,但核心问题在于:它认得字形,却认不得字义。就像把表格图片转成文字后,数字还在,但“这个数字属于哪一行哪一列”这种关键关系全丢了。
更麻烦的是,OCR的错误不是乱码,而是“看起来很合理”——6变8、1变7,甚至小数点位置都悄悄移动。在普通文章里,人眼能自动纠错,但在财务表格或科研数据里,每个数字都至关重要,错一个没人发现,最终可能导致结论完全颠倒。
所以,别再把扫描件当电子文档直接用。尤其在做数据分析、年报整理时,务必对照原图人工核对关键数字和表格结构。工具虽快,但“关系”需要人来把最后一道关。
<p>In the previous piece I argued that a PDF keeps where the glyphs sit and throws away what they meant. A scan is a harder case, because a scan does not even have glyphs. It has pixels. Everything else is reconstructed by software that is guessing, and the guessing is much better than it used to be, which is exactly what makes it dangerous.</p>
<p>More than twenty years of setting scientific books taught me what a table actually is. It is not a picture of rows and columns. It is a grid of relationships: this number belongs to this row label and this column header, and it means nothing at all detached from either. Publishers rebuild tables by hand when they come in as images, and they do it because there is no honest shortcut.</p>
<p>That is the whole argument of this post. OCR converts pixels into characters. It does not convert a page back into a document.</p>
<h2>
OCR errors are not random, and that is the problem
</h2>
<p>If OCR failed noisily, this would be a solved problem. You would see garbage, you would know.</p>
<p>It does not fail that way. It fails toward plausibility. A 6 becomes an 8. A 1 becomes a 7. A 5 becomes an S. A comma becomes a full stop, which in a European financial document turns 1.234 into 1,234 or the reverse. The engine is choosing the most likely character given the shape, and the most likely character is almost always a real one.</p>
<p>In prose, this is survivable. You read a sentence with one wrong letter and your brain corrects it without stopping. That is why OCR feels so accurate: you are testing it on text where you are the error correction.</p>
<p>In a table of figures there is no such redundancy. Every digit is load-bearing. Nothing in the surrounding context tells you that a margin should be 6.2 rather than 8.2. The wrong number is exactly as readable as the right one, carries the same confidence, and looks equally like a fact.</p>
<h2>
Where scanned tables actually break
</h2>
<p>Four failure modes, and I have seen all four in real documents.</p>
<p><strong>Column drift.</strong> A value lands one column to the left or right of where it belongs. Revenue for 2024 is now sitting under 2023. The total still adds up, because the same numbers are present, just attributed to the wrong period. Nothing looks wrong until someone builds a growth rate from it.</p>
<p><strong>Tables that continue across pages.</strong> In a printed book this is handled by repeating the header and adding a continuation rule. OCR sees two separate blobs on two separate pages, and unless something explicitly stitches them, half the table silently disappears or becomes its own orphan table with no headers at all.</p>
<p><strong>Merged and spanning cells.</strong> A header that spans three columns, or a row label that covers two rows, is a relationship expressed purely through geometry. Flatten it and the relationship is gone. The value that belonged to all three sub-columns now belongs to one of them, or to none.</p>
<p><strong>Rule lines read as characters.</strong> A thin vertical rule becomes a 1 or a pipe. A horizontal rule becomes a row of dashes or underscores that the parser treats as content. This one is easy to spot when you look and impossible to spot when you do not.</p>
<h2>
The confidence score will not save you
</h2>
<p>Most OCR engines return a confidence value, and it is tempting to gate on it. Below some threshold, flag; above it, trust.</p>
<p>It does not work, for the same reason it does not work in retrieval. The confidence is per-character and it measures how sure the engine is about the shape it saw, not whether the resulting document makes sense. A crisp, clean, high-confidence 8 that was actually a 6 scores beautifully. A slightly smudged but correctly read digit scores worse. The score is orthogonal to the thing you care about.</p>
<p>I measured a version of this problem in a different context and published the result: retrieval similarity scores could n
分享
阅读原文 ↗