HowdenParser 2.0.2__tar.gz → 2.0.3__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.
@@ -126,6 +126,10 @@ class MistralOCRParser(BaseParser, name="mistralocr"):
126
126
 
127
127
  return "\n".join(doc.markdown for doc in ocr_response.pages)
128
128
 
129
+ def __call__(self, file_path: Path) -> str:
130
+ # When instance is called, it delegates to parse
131
+ return self.parse(file_path)
132
+
129
133
  @staticmethod
130
134
  def _count_pages(file_path: Path) -> int:
131
135
  reader = PdfReader(str(file_path))
@@ -142,6 +146,10 @@ class LangChainParser(BaseParser, name="langchain"):
142
146
  response = self.model(text)
143
147
  return {"source": "LangChain", "output": response}
144
148
 
149
+ def __call__(self, file_path: Path) -> str:
150
+ # When instance is called, it delegates to parse
151
+ return self.parse(file_path)
152
+
145
153
 
146
154
  class LlamaParser(BaseParser, name="llamaparser"):
147
155
  def __init__(self, result_type: str, mode: bool, provider_and_model) -> None:
@@ -166,6 +174,10 @@ class LlamaParser(BaseParser, name="llamaparser"):
166
174
  documents = self._parser.load_data(str(file_path))
167
175
  return "\n".join(doc.text for doc in documents)
168
176
 
177
+ def __call__(self, file_path: Path) -> str:
178
+ # When instance is called, it delegates to parse
179
+ return self.parse(file_path)
180
+
169
181
 
170
182
  class HuggingFaceParser(BaseParser, name="huggingface"):
171
183
  def __init__(self, provider_and_model: str) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: HowdenParser
3
- Version: 2.0.2
3
+ Version: 2.0.3
4
4
  Summary: A simple configuration manager with Pydantic and JSON export.
5
5
  License: MIT
6
6
  Keywords: config,configuration,pydantic,json
@@ -14,7 +14,7 @@ build-backend = "poetry.core.masonry.api"
14
14
 
15
15
  [tool.poetry]
16
16
  name = "HowdenParser"
17
- version = "2.0.2"
17
+ version = "2.0.3"
18
18
  description = "A simple configuration manager with Pydantic and JSON export."
19
19
  authors = [ "JesperThoftIllemannJ <jesper.jaeger@howdendanmark.dk>",]
20
20
  readme = "README.md"
File without changes