docpluck 2.4.153__tar.gz → 2.4.158__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. {docpluck-2.4.153 → docpluck-2.4.158}/PKG-INFO +14 -6
  2. {docpluck-2.4.153 → docpluck-2.4.158}/README.md +396 -388
  3. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/__init__.py +32 -1
  4. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/batch.py +433 -431
  5. docpluck-2.4.158/docpluck/body.py +314 -0
  6. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/extract.py +111 -6
  7. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/extract_columns.py +422 -11
  8. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/extract_structured.py +391 -9
  9. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/normalize.py +1450 -74
  10. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/quality.py +41 -0
  11. docpluck-2.4.158/docpluck/references/__init__.py +217 -0
  12. docpluck-2.4.158/docpluck/references/link.py +345 -0
  13. docpluck-2.4.158/docpluck/references/parse.py +478 -0
  14. docpluck-2.4.158/docpluck/references/split.py +481 -0
  15. docpluck-2.4.158/docpluck/references/types.py +101 -0
  16. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/render.py +8351 -7473
  17. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/__init__.py +234 -234
  18. docpluck-2.4.158/docpluck/sections/_reference_entries.py +84 -0
  19. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/annotators/text.py +135 -2
  20. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/core.py +679 -657
  21. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/taxonomy.py +11 -2
  22. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/__init__.py +30 -4
  23. docpluck-2.4.158/docpluck/tables/bottom_extend.py +245 -0
  24. docpluck-2.4.158/docpluck/tables/camelot_cell_join.py +364 -0
  25. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/camelot_extract.py +1508 -1363
  26. docpluck-2.4.158/docpluck/tables/camelot_row_ties.py +278 -0
  27. docpluck-2.4.158/docpluck/tables/caption_rows.py +181 -0
  28. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/captions.py +56 -0
  29. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/cell_cleaning.py +1945 -1492
  30. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/column_split.py +8 -6
  31. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/detect.py +323 -1
  32. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/docx_tables.py +0 -1
  33. docpluck-2.4.158/docpluck/tables/dropped_glyphs.py +197 -0
  34. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/flatten.py +3120 -2168
  35. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/whitespace.py +64 -2
  36. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/telemetry.py +22 -0
  37. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/version.py +506 -498
  38. {docpluck-2.4.153 → docpluck-2.4.158}/pyproject.toml +1 -1
  39. {docpluck-2.4.153 → docpluck-2.4.158}/.gitignore +0 -0
  40. {docpluck-2.4.153 → docpluck-2.4.158}/LICENSE +0 -0
  41. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/__main__.py +0 -0
  42. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/cli.py +0 -0
  43. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/extract_docx.py +0 -0
  44. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/extract_docx_structured.py +0 -0
  45. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/extract_html.py +0 -0
  46. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/extract_layout.py +0 -0
  47. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/figures/__init__.py +0 -0
  48. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/glyph_evidence.py +0 -0
  49. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/glyph_names.py +0 -0
  50. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/resources.py +0 -0
  51. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/_offsets.py +0 -0
  52. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/annotators/__init__.py +0 -0
  53. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/annotators/docx.py +0 -0
  54. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/annotators/html.py +0 -0
  55. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/annotators/pdf.py +0 -0
  56. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/blocks.py +0 -0
  57. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/boundaries.py +0 -0
  58. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/sections/types.py +0 -0
  59. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/symbols.py +0 -0
  60. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/arm_spans.py +0 -0
  61. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/bbox_utils.py +0 -0
  62. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/cell_geometry.py +0 -0
  63. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/cluster.py +0 -0
  64. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/confidence.py +0 -0
  65. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/notes.py +0 -0
  66. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/render.py +0 -0
  67. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tables/rotated.py +0 -0
  68. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/tempfiles.py +0 -0
  69. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/testing/__init__.py +0 -0
  70. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/testing/_root.py +0 -0
  71. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/testing/corpus.py +0 -0
  72. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/testing/corpus_manifest.py +0 -0
  73. {docpluck-2.4.153 → docpluck-2.4.158}/docpluck/testing/regenerate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: docpluck
3
- Version: 2.4.153
3
+ Version: 2.4.158
4
4
  Summary: PDF, DOCX, and HTML text extraction and normalization for academic papers
5
5
  Project-URL: Homepage, https://docpluck.app
6
6
  Project-URL: Documentation, https://docpluck.app/api-docs
@@ -126,7 +126,7 @@ Requires Python 3.10 or newer.
126
126
  pip install "docpluck[all] @ git+https://github.com/giladfeldman/docpluck.git"
127
127
  ```
128
128
 
129
- To pin a release, append its tag: `...docpluck.git@v2.4.153`. The package is also on PyPI
129
+ To pin a release, append its tag: `...docpluck.git@v2.4.158`. The package is also on PyPI
130
130
  (`pip install docpluck`); the GitHub tags are the release of record and PyPI can trail them,
131
131
  so check `pip index versions docpluck` if you need a specific version from PyPI.
132
132
 
@@ -274,6 +274,14 @@ of interest, data availability, author contributions), references, appendix, sup
274
274
  material and footnotes. `SECTIONING_VERSION` versions the algorithm; `sectioning_text_id`
275
275
  fingerprints the text buffer the offsets index into.
276
276
 
277
+ ### Body text without the bibliography
278
+
279
+ `extract_pdf_body(pdf_bytes)` returns `(body, report)`: the layout-aware normalized text with
280
+ the reference list removed (headed, German `Literatur`, or an unheaded numbered list), and
281
+ `body_scope_text(text)` does the same cut on text you already have. A references section ends
282
+ where its entry-shaped lines end, so body text placed after the bibliography is kept.
283
+ `report.removed` lists every span taken out. Nothing else changes.
284
+
277
285
  ### Tables and figures
278
286
 
279
287
  `extract_pdf_structured(pdf_bytes, *, thorough=False, table_text_mode="raw")` and
@@ -296,7 +304,7 @@ fingerprints the text buffer the offsets index into.
296
304
 
297
305
  `flatten_tables_for_paper(tables)` (or `flatten_table(table)` for one) turns each body row of
298
306
  each table into a `FlattenedRow`: its table, page, row label, header, cells, an English sentence
299
- (`"Importance: t(741) = 3.93, p < .001, d = 0.29"`) and parsed `fields`. A confidence interval is stated at the level the table prints (`90% CI`, `95% CrI`; a bare `CI` when none is stated), and `fields["CI_level"]` carries that level when present. This is the input
307
+ (`"Importance: t(741) = 3.93, p < .001, d = 0.29"`) and parsed `fields`. A confidence interval is stated at the level the table prints (`90% CI`, `95% CrI`; a bare `CI` when none is stated), and `fields["CI_level"]` carries that level when present, with `fields["CI_kind"]` (`CI`, `CrI` or `HDI`); `fields["p_text"]` carries the p-value exactly as printed (`".050"` beside `p` = 0.05), and `fields_raw` carries every typed number as printed, keyed like `fields` (`fields_raw["t"]` = `"-1.40"`); descriptive cells (`M (SD)`, `b (SE)`, `n (%)`) are typed as `M`/`SD`, `est`/`SE` or `count`/`pct` only when the table states what the parentheses hold, one record per arm column with its `group`; a printed inequality on any other statistic travels as `<key>_op` (`fields["eta2_op"]` = `"<"` for `< 0.001`). This is the input
300
308
  format for downstream statistics checkers; the CLI writes it as JSON Lines with
301
309
  `render --tables-jsonl`. `render_flattened_inline(rows, table_id=...)` renders rows back as a
302
310
  Markdown block.
@@ -365,13 +373,13 @@ Options for `render`:
365
373
  ## Configuration
366
374
 
367
375
  docpluck reads no configuration files. These environment variables change behaviour; all
368
- default to off.
376
+ default to off except `DOCPLUCK_COLUMN_CORRECT_GENERAL`, which is on unless set to `0`.
369
377
 
370
378
  | variable | effect when set to `1` |
371
379
  |---|---|
372
380
  | `DOCPLUCK_FALLBACK_LOG` | print every fallback event to standard error as it happens |
373
381
  | `DOCPLUCK_DISABLE_CAMELOT` | skip Camelot; tables then come only from the non-Camelot paths |
374
- | `DOCPLUCK_COLUMN_CORRECT_GENERAL` | experimental: apply two-column re-ordering to more pages (still gated on a clean central gutter and on every word surviving) |
382
+ | `DOCPLUCK_COLUMN_CORRECT_GENERAL` | on by default; `0` turns it off. Re-orders a two-column page that pdftotext interleaved, left column then right, only when the page has a clean central gutter and every word survives. A full-width table above or below the columns is read in place; a page that is a table across the gutter, or two-column blocks stacked apart or in different type, keeps its order |
375
383
  | `DOCPLUCK_COLUMN_CORRECT_BANDED` | experimental: per-band re-extraction for mixed-layout pages the whole-page corrector skips |
376
384
  | `DOCPLUCK_RCT_L2_BYPASS` | diagnostic only: disables two table-region guards, for measuring their effect |
377
385
 
@@ -423,7 +431,7 @@ default to off.
423
431
  If you use docpluck in research, cite the version you used (from `get_version_info()`):
424
432
 
425
433
  > Feldman, G. (2026). *docpluck: Text and statistic extraction from academic papers*
426
- > (Version 2.4.153) [Computer software]. https://github.com/giladfeldman/docpluck
434
+ > (Version 2.4.158) [Computer software]. https://github.com/giladfeldman/docpluck
427
435
 
428
436
  Machine-readable metadata is in [CITATION.cff](CITATION.cff); GitHub's "Cite this repository"
429
437
  button reads it.