HowdenParser 5.2.4__tar.gz → 5.2.6__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.
- {howdenparser-5.2.4 → howdenparser-5.2.6}/HowdenParser/parsers/llama_parser.py +15 -4
- {howdenparser-5.2.4 → howdenparser-5.2.6}/PKG-INFO +2 -1
- {howdenparser-5.2.4 → howdenparser-5.2.6}/pyproject.toml +43 -42
- {howdenparser-5.2.4 → howdenparser-5.2.6}/HowdenParser/__init__.py +0 -0
- {howdenparser-5.2.4 → howdenparser-5.2.6}/HowdenParser/parameter/__init__.py +0 -0
- {howdenparser-5.2.4 → howdenparser-5.2.6}/HowdenParser/parameter/llamaparser.py +0 -0
- {howdenparser-5.2.4 → howdenparser-5.2.6}/HowdenParser/parameter/mistralocr.py +0 -0
- {howdenparser-5.2.4 → howdenparser-5.2.6}/HowdenParser/parser.py +0 -0
- {howdenparser-5.2.4 → howdenparser-5.2.6}/HowdenParser/parsers/__init__.py +0 -0
- {howdenparser-5.2.4 → howdenparser-5.2.6}/HowdenParser/parsers/langchain_parser.py +0 -0
- {howdenparser-5.2.4 → howdenparser-5.2.6}/HowdenParser/parsers/mistral_parser.py +0 -0
- {howdenparser-5.2.4 → howdenparser-5.2.6}/README.md +0 -0
|
@@ -3,13 +3,20 @@ import json
|
|
|
3
3
|
import logging
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from ..parser import BaseParser
|
|
6
|
-
from typing import Any
|
|
6
|
+
from typing import Any, Optional
|
|
7
7
|
from llama_parse import ResultType
|
|
8
8
|
|
|
9
9
|
class LlamaParser(BaseParser, name="llamaparser"):
|
|
10
|
-
def __init__(self, result_type: str,
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
def __init__(self, result_type: str,
|
|
11
|
+
model: str, parse_mode: str,
|
|
12
|
+
provider_and_model: str,
|
|
13
|
+
merge_tables_across_pages_in_markdown: bool,
|
|
14
|
+
preserve_layout_alignment_across_pages: bool,
|
|
15
|
+
hide_footers: bool,
|
|
16
|
+
hide_headers: bool,
|
|
17
|
+
precise_bounding_box: Optional[bool] = None,
|
|
18
|
+
line_level_bounding_box: Optional[bool] = None,
|
|
19
|
+
) -> None:
|
|
13
20
|
|
|
14
21
|
super().__init__()
|
|
15
22
|
# Capture only input parameters
|
|
@@ -30,6 +37,8 @@ class LlamaParser(BaseParser, name="llamaparser"):
|
|
|
30
37
|
self.preserve_layout_alignment_across_pages = preserve_layout_alignment_across_pages
|
|
31
38
|
self.hide_footers = hide_footers
|
|
32
39
|
self.hide_headers = hide_headers
|
|
40
|
+
self.precise_bounding_box = precise_bounding_box
|
|
41
|
+
self.line_level_bounding_box = line_level_bounding_box
|
|
33
42
|
self.hashed = self.compute_hash(self._input_params)
|
|
34
43
|
# DO NOT CREATE LlamaParse HERE
|
|
35
44
|
# It creates asyncio objects bound to the wrong loop
|
|
@@ -66,6 +75,8 @@ class LlamaParser(BaseParser, name="llamaparser"):
|
|
|
66
75
|
preserve_layout_alignment_across_pages=self.preserve_layout_alignment_across_pages,
|
|
67
76
|
hide_footers=self.hide_footers,
|
|
68
77
|
hide_headers=self.hide_headers,
|
|
78
|
+
precise_bounding_box=self.precise_bounding_box,
|
|
79
|
+
line_level_bounding_box=self.line_level_bounding_box,
|
|
69
80
|
)
|
|
70
81
|
|
|
71
82
|
logging.info("LlamaParser initialized inside worker thread")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HowdenParser
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.6
|
|
4
4
|
Summary: A simple configuration manager with Pydantic and JSON export.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: config,configuration,pydantic,json
|
|
@@ -17,6 +17,7 @@ Requires-Dist: mistralai (>=1.9.3,<2.0.0)
|
|
|
17
17
|
Requires-Dist: pdf2image (>=1.17.0,<2.0.0)
|
|
18
18
|
Requires-Dist: pypdf2 (>=3.0.1,<4.0.0)
|
|
19
19
|
Requires-Dist: pytest (>=9.0.2,<10.0.0)
|
|
20
|
+
Requires-Dist: tomli-w (>=1.2.0,<2.0.0)
|
|
20
21
|
Description-Content-Type: text/markdown
|
|
21
22
|
|
|
22
23
|
# OCR & LLM Parser
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "HowdenParser"
|
|
3
|
-
version = "5.2.
|
|
4
|
-
description = "A simple configuration manager with Pydantic and JSON export."
|
|
5
|
-
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.12,<3.14"
|
|
7
|
-
authors = [
|
|
8
|
-
{ name = "JesperThoftIllemannJ", email = "jesper.jaeger@howdendanmark.dk" },
|
|
9
|
-
]
|
|
10
|
-
keywords = [
|
|
11
|
-
"config",
|
|
12
|
-
"configuration",
|
|
13
|
-
"pydantic",
|
|
14
|
-
"json",
|
|
15
|
-
]
|
|
16
|
-
homepage = "https://github.com/yourusername/config"
|
|
17
|
-
repository = "https://github.com/yourusername/config"
|
|
18
|
-
documentation = "https://github.com/yourusername/config"
|
|
19
|
-
dependencies = [
|
|
20
|
-
"mistralai (>=1.9.3,<2.0.0)",
|
|
21
|
-
"llama-parse (>=0.6.58,<0.7.0)",
|
|
22
|
-
"pypdf2 (>=3.0.1,<4.0.0)",
|
|
23
|
-
"pdf2image (>=1.17.0,<2.0.0)",
|
|
24
|
-
"langchain (>=1.1.3,<2.0.0)",
|
|
25
|
-
"pytest (>=9.0.2,<10.0.0)",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
1
|
+
[project]
|
|
2
|
+
name = "HowdenParser"
|
|
3
|
+
version = "5.2.6"
|
|
4
|
+
description = "A simple configuration manager with Pydantic and JSON export."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12,<3.14"
|
|
7
|
+
authors = [
|
|
8
|
+
{ name = "JesperThoftIllemannJ", email = "jesper.jaeger@howdendanmark.dk" },
|
|
9
|
+
]
|
|
10
|
+
keywords = [
|
|
11
|
+
"config",
|
|
12
|
+
"configuration",
|
|
13
|
+
"pydantic",
|
|
14
|
+
"json",
|
|
15
|
+
]
|
|
16
|
+
homepage = "https://github.com/yourusername/config"
|
|
17
|
+
repository = "https://github.com/yourusername/config"
|
|
18
|
+
documentation = "https://github.com/yourusername/config"
|
|
19
|
+
dependencies = [
|
|
20
|
+
"mistralai (>=1.9.3,<2.0.0)",
|
|
21
|
+
"llama-parse (>=0.6.58,<0.7.0)",
|
|
22
|
+
"pypdf2 (>=3.0.1,<4.0.0)",
|
|
23
|
+
"pdf2image (>=1.17.0,<2.0.0)",
|
|
24
|
+
"langchain (>=1.1.3,<2.0.0)",
|
|
25
|
+
"pytest (>=9.0.2,<10.0.0)",
|
|
26
|
+
"tomli-w (>=1.2.0,<2.0.0)",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.license]
|
|
30
|
+
text = "MIT"
|
|
31
|
+
|
|
32
|
+
[build-system]
|
|
33
|
+
requires = [
|
|
34
|
+
"poetry-core>=2.0.0,<3.0.0",
|
|
35
|
+
]
|
|
36
|
+
build-backend = "poetry.core.masonry.api"
|
|
37
|
+
|
|
38
|
+
[dependency-groups]
|
|
39
|
+
dev = [
|
|
40
|
+
"toml (>=0.10.2,<0.11.0)",
|
|
41
|
+
"tomli-w (>=1.2.0,<2.0.0)",
|
|
42
|
+
"howdenconfig (>=1.0.6,<2.0.0)",
|
|
43
|
+
]
|
|
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
|