prevectorchunks-core 0.1.24__py3-none-any.whl → 0.1.25__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prevectorchunks-core
3
- Version: 0.1.24
3
+ Version: 0.1.25
4
4
  Summary: A Python module that allows conversion of a document into chunks to be inserted into Pinecone vector database
5
5
  Author-email: Zul Al-Kabir <zul.developer.2023@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/yourusername/mydep
@@ -187,6 +187,41 @@ Updates existing chunks in the Vector Database by document name.
187
187
  - Keeping VDB chunks up to date when documents change
188
188
  - Re-ingesting revised or corrected content
189
189
 
190
+ ---
191
+ ### 5. ``markdown_and_chunk_documents``
192
+ ```python
193
+ from prevectorchunks_core.services.markdown_and_chunk_documents import MarkdownAndChunkDocuments
194
+
195
+ markdown_processor = MarkdownAndChunkDocuments()
196
+ mapped_chunks = markdown_processor.markdown_and_chunk_documents("example.pdf")
197
+ ```
198
+
199
+ **Description**
200
+ This new function automatically:
201
+ 1. Converts a document (PDF, DOCX, etc.) into images using `DocuToImageConverter`.
202
+ 2. Extracts **Markdown and text** content from those images using `DocuToMarkdownExtractor` (powered by GPT).
203
+ 3. Converts the extracted markdown text into **RL-based chunks** using `ChunkMapper` and `chunk_documents`.
204
+ 4. Merges unmatched markdown segments into the final structured output.
205
+
206
+ **Parameters**
207
+ - `file_path` (*str*): Path to the document (PDF, DOCX, or image) you want to process.
208
+
209
+ **Returns**
210
+ - `mapped_chunks` (*list[dict]*): A list of markdown-based chunks with both markdown and chunked text content.
211
+
212
+ **Example**
213
+ ```python
214
+ if __name__ == "__main__":
215
+ markdown_processor = MarkdownAndChunkDocuments()
216
+ mapped_chunks = markdown_processor.markdown_and_chunk_documents("421307-nz-au-top-loading-washer-guide-shorter.pdf")
217
+ print(mapped_chunks)
218
+ ```
219
+
220
+ **Use Cases**
221
+ - End-to-end document-to-markdown-to-chunks pipeline
222
+ - Automating preprocessing for RAG/LLM ingestion
223
+ - Extracting structured markdown for semantic search or content indexing
224
+
190
225
  ---
191
226
 
192
227
  ## 🚀 Example Workflow
@@ -32,8 +32,8 @@ prevectorchunks_core/utils/__init__.py,sha256=aez3v2dwGHXvmALXVBPR-mQgvxMqxv9NsE
32
32
  prevectorchunks_core/utils/extract_content.py,sha256=fMDT-BsjYutHLnOFebLhMFpb1UFAB8ldGldxh11FsXw,2920
33
33
  prevectorchunks_core/utils/file_loader.py,sha256=JkCKiz3M2TMw5qHoTJXhbn33PfTv5gvQ3nfrbaQOmHs,10689
34
34
  prevectorchunks_core/utils/llm_wrapper.py,sha256=7GfyM5p5PeIehi4Dj5jgC7-xi2SjZuyyPuLkWtucQzQ,1139
35
- prevectorchunks_core-0.1.24.dist-info/licenses/LICENCE,sha256=Ljp4XVKnncsQ59h0eMW6J5V-ylsVeqDRC8smR7UPIDs,512
36
- prevectorchunks_core-0.1.24.dist-info/METADATA,sha256=bkDVcEw_YBf8Ym3gQNUm_uN6mZL3jqP59ZcBcW5ynpo,9272
37
- prevectorchunks_core-0.1.24.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
- prevectorchunks_core-0.1.24.dist-info/top_level.txt,sha256=OWJgfrUDNTh49PpKvRXHY8lVeWqzFbTr9OkDoAvpvPk,21
39
- prevectorchunks_core-0.1.24.dist-info/RECORD,,
35
+ prevectorchunks_core-0.1.25.dist-info/licenses/LICENCE,sha256=Ljp4XVKnncsQ59h0eMW6J5V-ylsVeqDRC8smR7UPIDs,512
36
+ prevectorchunks_core-0.1.25.dist-info/METADATA,sha256=MkwN6c12SBuLRwFgaWUwANwGMsno4939fo5jU9otYBc,10687
37
+ prevectorchunks_core-0.1.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
+ prevectorchunks_core-0.1.25.dist-info/top_level.txt,sha256=OWJgfrUDNTh49PpKvRXHY8lVeWqzFbTr9OkDoAvpvPk,21
39
+ prevectorchunks_core-0.1.25.dist-info/RECORD,,