mistocr 0.2.11__tar.gz → 0.2.12__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.
- {mistocr-0.2.11/mistocr.egg-info → mistocr-0.2.12}/PKG-INFO +1 -1
- mistocr-0.2.12/mistocr/__init__.py +1 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/mistocr/_modidx.py +1 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/mistocr/refine.py +8 -3
- {mistocr-0.2.11 → mistocr-0.2.12/mistocr.egg-info}/PKG-INFO +1 -1
- {mistocr-0.2.11 → mistocr-0.2.12}/settings.ini +1 -1
- mistocr-0.2.11/mistocr/__init__.py +0 -1
- {mistocr-0.2.11 → mistocr-0.2.12}/LICENSE +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/MANIFEST.in +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/README.md +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/mistocr/core.py +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/mistocr/pipeline.py +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/mistocr.egg-info/SOURCES.txt +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/mistocr.egg-info/dependency_links.txt +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/mistocr.egg-info/entry_points.txt +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/mistocr.egg-info/not-zip-safe +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/mistocr.egg-info/requires.txt +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/mistocr.egg-info/top_level.txt +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/pyproject.toml +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/setup.cfg +0 -0
- {mistocr-0.2.11 → mistocr-0.2.12}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.12"
|
|
@@ -22,6 +22,7 @@ d = { 'settings': { 'branch': 'main',
|
|
|
22
22
|
'mistocr.core.wait_for_job': ('core.html#wait_for_job', 'mistocr/core.py')},
|
|
23
23
|
'mistocr.pipeline': {'mistocr.pipeline.pdf_to_md': ('pipeline.html#pdf_to_md', 'mistocr/pipeline.py')},
|
|
24
24
|
'mistocr.refine': { 'mistocr.refine.HeadingCorrection': ('refine.html#headingcorrection', 'mistocr/refine.py'),
|
|
25
|
+
'mistocr.refine.HeadingCorrections': ('refine.html#headingcorrections', 'mistocr/refine.py'),
|
|
25
26
|
'mistocr.refine.ImgDescription': ('refine.html#imgdescription', 'mistocr/refine.py'),
|
|
26
27
|
'mistocr.refine.add_descs_to_pg': ('refine.html#add_descs_to_pg', 'mistocr/refine.py'),
|
|
27
28
|
'mistocr.refine.add_descs_to_pgs': ('refine.html#add_descs_to_pgs', 'mistocr/refine.py'),
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
# %% auto 0
|
|
6
6
|
__all__ = ['prompt_fix_hdgs', 'describe_img_prompt', 'get_hdgs', 'add_pg_hdgs', 'read_pgs_pg', 'fmt_hdgs_idx',
|
|
7
|
-
'HeadingCorrection', '
|
|
8
|
-
'
|
|
9
|
-
'add_img_descs']
|
|
7
|
+
'HeadingCorrection', 'HeadingCorrections', 'fix_hdg_hierarchy', 'mk_fixes_lut', 'apply_hdg_fixes',
|
|
8
|
+
'fix_hdgs', 'ImgDescription', 'describe_img', 'limit', 'parse_r', 'describe_imgs', 'save_img_descs',
|
|
9
|
+
'add_descs_to_pg', 'add_descs_to_pgs', 'add_img_descs']
|
|
10
10
|
|
|
11
11
|
# %% ../nbs/01_refine.ipynb 3
|
|
12
12
|
from fastcore.all import *
|
|
@@ -64,6 +64,11 @@ class HeadingCorrection(BaseModel):
|
|
|
64
64
|
index: int
|
|
65
65
|
corrected: str
|
|
66
66
|
|
|
67
|
+
# %% ../nbs/01_refine.ipynb 19
|
|
68
|
+
class HeadingCorrections(BaseModel):
|
|
69
|
+
"Collection of heading corrections returned by the LLM"
|
|
70
|
+
corrections: list[HeadingCorrection]
|
|
71
|
+
|
|
67
72
|
# %% ../nbs/01_refine.ipynb 21
|
|
68
73
|
prompt_fix_hdgs = """Fix markdown heading hierarchy errors while preserving the document's intended structure.
|
|
69
74
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.11"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|