scanquorum 0.2.1__tar.gz → 0.3.0__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 (30) hide show
  1. {scanquorum-0.2.1/scanquorum.egg-info → scanquorum-0.3.0}/PKG-INFO +16 -4
  2. {scanquorum-0.2.1 → scanquorum-0.3.0}/README.md +14 -2
  3. {scanquorum-0.2.1 → scanquorum-0.3.0}/pyproject.toml +1 -1
  4. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum/__init__.py +1 -1
  5. scanquorum-0.3.0/scanquorum/build.py +974 -0
  6. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum/verify_ai.py +11 -2
  7. {scanquorum-0.2.1 → scanquorum-0.3.0/scanquorum.egg-info}/PKG-INFO +16 -4
  8. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum.egg-info/SOURCES.txt +2 -0
  9. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum.egg-info/requires.txt +1 -1
  10. scanquorum-0.3.0/tests/test_purescan.py +138 -0
  11. scanquorum-0.3.0/tests/test_strict_and_mixed.py +317 -0
  12. scanquorum-0.2.1/scanquorum/build.py +0 -463
  13. {scanquorum-0.2.1 → scanquorum-0.3.0}/LICENSE +0 -0
  14. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum/__main__.py +0 -0
  15. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum/doctor.py +0 -0
  16. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum/engines/__init__.py +0 -0
  17. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum/engines/rapidocr_en.py +0 -0
  18. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum/engines/rapidocr_multi.py +0 -0
  19. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum/engines/tesseract.py +0 -0
  20. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum/layout.py +0 -0
  21. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum/vote.py +0 -0
  22. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum.egg-info/dependency_links.txt +0 -0
  23. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum.egg-info/entry_points.txt +0 -0
  24. {scanquorum-0.2.1 → scanquorum-0.3.0}/scanquorum.egg-info/top_level.txt +0 -0
  25. {scanquorum-0.2.1 → scanquorum-0.3.0}/setup.cfg +0 -0
  26. {scanquorum-0.2.1 → scanquorum-0.3.0}/tests/test_doctor.py +0 -0
  27. {scanquorum-0.2.1 → scanquorum-0.3.0}/tests/test_goldset.py +0 -0
  28. {scanquorum-0.2.1 → scanquorum-0.3.0}/tests/test_riskcov.py +0 -0
  29. {scanquorum-0.2.1 → scanquorum-0.3.0}/tests/test_safety.py +0 -0
  30. {scanquorum-0.2.1 → scanquorum-0.3.0}/tests/test_vote_parity.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scanquorum
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: Read a scanned page with several independent OCR engines and accept a word only when they agree. No language model in the transcription path.
5
5
  Author: Igor Saevets
6
6
  License-Expression: MIT
@@ -29,7 +29,7 @@ Requires-Dist: onnxruntime<2,>=1.17
29
29
  Requires-Dist: numpy<3,>=1.24
30
30
  Requires-Dist: pillow<13,>=10
31
31
  Provides-Extra: measured
32
- Requires-Dist: pymupdf==1.28.0; extra == "measured"
32
+ Requires-Dist: pymupdf==1.28.2; extra == "measured"
33
33
  Requires-Dist: rapidocr==3.9.2; extra == "measured"
34
34
  Requires-Dist: onnxruntime==1.28.0; extra == "measured"
35
35
  Requires-Dist: numpy==2.4.6; extra == "measured"
@@ -254,7 +254,10 @@ one opinion agreeing with itself, and the header says so instead of counting it
254
254
 
255
255
  `engines_unavailable` is empty here. If an engine had failed to load, the run would still have
256
256
  produced this file, complete and confident, with fewer voters. That field and the console
257
- warning are the only places it would show.
257
+ warning are the only places it would show. Since 0.3.0 there is one floor under that: if fewer
258
+ than two OCR engines load, `build` refuses with exit 2 and writes nothing, and with `--no-strict`
259
+ it writes the file and exits 1 - a run with no second engine is the PDF's own text layer wearing this
260
+ tool's header.
258
261
 
259
262
  The four count fields **sum to `words`**, and the code asserts it. `unconfirmed` is also
260
263
  asserted to equal the number of entries in the file it names, so the sentence "listed in X" is
@@ -274,11 +277,20 @@ a page.
274
277
 
275
278
  ## Install
276
279
 
280
+ ```bash
281
+ pip install scanquorum # working tool
282
+ pip install scanquorum[measured] # exact pins used for every published number
283
+ scanquorum doctor # <- run this before anything else
284
+ scanquorum build samples/02-matter-of-gaglioti-14-IN-Dec-677.pdf
285
+ ```
286
+
287
+ From a checkout instead, if you want to hack on it:
288
+
277
289
  ```bash
278
290
  git clone https://github.com/igorsaevets/scanquorum
279
291
  cd scanquorum
280
292
  python -m pip install -r requirements.txt
281
- python -m scanquorum doctor # <- run this before anything else
293
+ python -m scanquorum doctor
282
294
  python -m scanquorum build samples/02-matter-of-gaglioti-14-IN-Dec-677.pdf
283
295
  ```
284
296
 
@@ -216,7 +216,10 @@ one opinion agreeing with itself, and the header says so instead of counting it
216
216
 
217
217
  `engines_unavailable` is empty here. If an engine had failed to load, the run would still have
218
218
  produced this file, complete and confident, with fewer voters. That field and the console
219
- warning are the only places it would show.
219
+ warning are the only places it would show. Since 0.3.0 there is one floor under that: if fewer
220
+ than two OCR engines load, `build` refuses with exit 2 and writes nothing, and with `--no-strict`
221
+ it writes the file and exits 1 - a run with no second engine is the PDF's own text layer wearing this
222
+ tool's header.
220
223
 
221
224
  The four count fields **sum to `words`**, and the code asserts it. `unconfirmed` is also
222
225
  asserted to equal the number of entries in the file it names, so the sentence "listed in X" is
@@ -236,11 +239,20 @@ a page.
236
239
 
237
240
  ## Install
238
241
 
242
+ ```bash
243
+ pip install scanquorum # working tool
244
+ pip install scanquorum[measured] # exact pins used for every published number
245
+ scanquorum doctor # <- run this before anything else
246
+ scanquorum build samples/02-matter-of-gaglioti-14-IN-Dec-677.pdf
247
+ ```
248
+
249
+ From a checkout instead, if you want to hack on it:
250
+
239
251
  ```bash
240
252
  git clone https://github.com/igorsaevets/scanquorum
241
253
  cd scanquorum
242
254
  python -m pip install -r requirements.txt
243
- python -m scanquorum doctor # <- run this before anything else
255
+ python -m scanquorum doctor
244
256
  python -m scanquorum build samples/02-matter-of-gaglioti-14-IN-Dec-677.pdf
245
257
  ```
246
258
 
@@ -64,7 +64,7 @@ dependencies = [
64
64
  # The exact set the README's numbers were measured with on 2026-08-06, Python 3.14.6, Windows 11.
65
65
  # Quote a figure from the README only from an environment installed this way.
66
66
  measured = [
67
- "pymupdf==1.28.0",
67
+ "pymupdf==1.28.2",
68
68
  "rapidocr==3.9.2",
69
69
  "onnxruntime==1.28.0",
70
70
  "numpy==2.4.6",
@@ -3,7 +3,7 @@ engines agree, and show you the ones they do not.
3
3
 
4
4
  No language model is involved in transcription. See README.md.
5
5
  """
6
- __version__ = "0.2.1"
6
+ __version__ = "0.3.0"
7
7
 
8
8
  # A Windows console defaults to a legacy code page (cp1251, cp866, cp1252...) and
9
9
  # raises UnicodeEncodeError the first time anything prints a character outside it.