Commit 793d416
committed
fix(parser): lower word-space threshold 0.30 -> 0.20 of font size
PDFs emit one positioned glyph per text item with no explicit spaces;
the parser infers word boundaries from the X-gap between glyphs.
Measured against arXiv papers, real word-boundary gaps land around
0.20-0.30 of fontSize while intra-word kerning stays near zero. The
old 0.30 threshold sat above most word gaps, so multi-word headings
and body text ran together (implementingtensor2tensor,
ModelArchitecture). 0.20 cleanly separates words without splitting
tokens like tensor2tensor.1 parent 764701c commit 793d416
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
266 | 273 | | |
267 | 274 | | |
268 | 275 | | |
| |||
0 commit comments