automated-document-parser 0.1.4__tar.gz → 0.1.5__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.
- automated_document_parser-0.1.5/.github/workflows/docs.yml +60 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/.gitignore +4 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/.pre-commit-config.yaml +1 -1
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/Makefile +18 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/PKG-INFO +7 -4
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/README.md +4 -3
- automated_document_parser-0.1.5/docs/.nojekyll +0 -0
- automated_document_parser-0.1.5/docs/Makefile +20 -0
- automated_document_parser-0.1.5/docs/README.md +99 -0
- automated_document_parser-0.1.5/docs/api.rst +188 -0
- automated_document_parser-0.1.5/docs/conf.py +85 -0
- automated_document_parser-0.1.5/docs/index.rst +131 -0
- automated_document_parser-0.1.5/docs/modules.rst +9 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/notebook_examples/rag_example.ipynb +320 -21
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/pyproject.toml +3 -1
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/requirements.txt +33 -1
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/src/automated_document_parser/__init__.py +1 -1
- automated_document_parser-0.1.5/src/automated_document_parser/config.py +88 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/__init__.py +29 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/file_load/__init__.py +30 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/file_load/base.py +53 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/file_load/csv_loader.py +56 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/file_load/docx_loader.py +55 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/file_load/html_loader.py +55 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/file_load/json_loader.py +59 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/file_load/text_loader.py +58 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/file_loaders.py +154 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/__init__.py +47 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/base.py +72 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/loader.py +180 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/mathpix_loader.py +75 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/opendataloader_loader.py +65 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/pdfplumber_loader.py +60 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/pymupdf4llm_loader.py +58 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/pymupdf_loader.py +60 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/pypdf_loader.py +51 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/pypdfium2_loader.py +60 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/textract_loader.py +74 -0
- automated_document_parser-0.1.5/src/automated_document_parser/loaders/pdf_load/unstructured_loader.py +72 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/test/test_file_loaders.py +56 -0
- automated_document_parser-0.1.5/test/test_pdf_loaders.py +825 -0
- automated_document_parser-0.1.4/src/automated_document_parser/config.py +0 -43
- automated_document_parser-0.1.4/src/automated_document_parser/loaders/__init__.py +0 -5
- automated_document_parser-0.1.4/src/automated_document_parser/loaders/base_loader.py +0 -1
- automated_document_parser-0.1.4/src/automated_document_parser/loaders/file_loaders.py +0 -113
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/.github/workflows/ci.yml +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/.github/workflows/publish.yml +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/LICENSE +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/notebook_examples/sample_docs/data.csv +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/notebook_examples/sample_docs/machine_learning.txt +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/notebook_examples/sample_docs/python_basics.txt +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/src/automated_document_parser/core.py +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/src/automated_document_parser/main.py +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/src/automated_document_parser/utils.py +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/test/__init__.py +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/test/test_config.py +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/test/test_core.py +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/test/test_main.py +0 -0
- {automated_document_parser-0.1.4 → automated_document_parser-0.1.5}/test/test_utils.py +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Build and Deploy Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
pages: write
|
|
15
|
+
id-token: write
|
|
16
|
+
|
|
17
|
+
# Allow only one concurrent deployment
|
|
18
|
+
concurrency:
|
|
19
|
+
group: "pages"
|
|
20
|
+
cancel-in-progress: false
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
|
|
29
|
+
- name: Set up Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: '3.13'
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: |
|
|
36
|
+
python -m pip install --upgrade pip
|
|
37
|
+
pip install sphinx sphinx-rtd-theme
|
|
38
|
+
pip install -e .
|
|
39
|
+
|
|
40
|
+
- name: Build documentation
|
|
41
|
+
run: |
|
|
42
|
+
cd docs
|
|
43
|
+
make html
|
|
44
|
+
|
|
45
|
+
- name: Upload artifact
|
|
46
|
+
uses: actions/upload-pages-artifact@v3
|
|
47
|
+
with:
|
|
48
|
+
path: docs/_build/html
|
|
49
|
+
|
|
50
|
+
deploy:
|
|
51
|
+
environment:
|
|
52
|
+
name: github-pages
|
|
53
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
needs: build
|
|
56
|
+
if: github.ref == 'refs/heads/master'
|
|
57
|
+
steps:
|
|
58
|
+
- name: Deploy to GitHub Pages
|
|
59
|
+
id: deployment
|
|
60
|
+
uses: actions/deploy-pages@v4
|
|
@@ -57,3 +57,21 @@ publish-pypi: build
|
|
|
57
57
|
@echo "Published to PyPI!"
|
|
58
58
|
@echo "Install with: pip install automated-document-parser"
|
|
59
59
|
|
|
60
|
+
docs:
|
|
61
|
+
@echo "Building documentation..."
|
|
62
|
+
cd docs && $(MAKE) clean
|
|
63
|
+
cd docs && $(MAKE) html
|
|
64
|
+
@cp docs/.nojekyll docs/_build/html/
|
|
65
|
+
@echo "Documentation built successfully!"
|
|
66
|
+
@echo "Open docs/_build/html/index.html in your browser"
|
|
67
|
+
|
|
68
|
+
docs-clean:
|
|
69
|
+
@echo "Cleaning documentation build..."
|
|
70
|
+
cd docs && $(MAKE) clean
|
|
71
|
+
@echo "Documentation cleaned!"
|
|
72
|
+
|
|
73
|
+
docs-serve:
|
|
74
|
+
@echo "Starting documentation server..."
|
|
75
|
+
@echo "Open http://localhost:8000 in your browser"
|
|
76
|
+
cd docs/_build/html && python -m http.server 8000
|
|
77
|
+
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: automated-document-parser
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: A powerful and automated document parser built with LangChain for intelligent document processing
|
|
5
5
|
Project-URL: Homepage, https://github.com/Pulkit12dhingra/automated-document-parser
|
|
6
|
+
Project-URL: Documentation, https://pulkit12dhingra.github.io/automated-document-parser/
|
|
6
7
|
Project-URL: Repository, https://github.com/Pulkit12dhingra/automated-document-parser
|
|
7
8
|
Project-URL: Issues, https://github.com/Pulkit12dhingra/automated-document-parser/issues
|
|
8
9
|
Author-email: Pulkit Dhingra <pulkit12dhingra@example.com>
|
|
@@ -45,6 +46,7 @@ Requires-Dist: pypdf>=5.1.0
|
|
|
45
46
|
Requires-Dist: python-docx>=1.1.0
|
|
46
47
|
Requires-Dist: python-magic>=0.4.27
|
|
47
48
|
Requires-Dist: sentence-transformers>=5.1.2
|
|
49
|
+
Requires-Dist: sphinx>=8.2.3
|
|
48
50
|
Requires-Dist: torch>=2.9.0
|
|
49
51
|
Requires-Dist: transformers>=4.57.1
|
|
50
52
|
Provides-Extra: dev
|
|
@@ -68,8 +70,8 @@ A powerful and automated document parser built with LangChain for intelligent do
|
|
|
68
70
|
|
|
69
71
|
## Features
|
|
70
72
|
|
|
71
|
-
- Automatic file type detection based on file extensions
|
|
72
|
-
- Support for multiple document formats
|
|
73
|
+
- **Automatic file type detection** based on file extensions
|
|
74
|
+
- **Support for multiple document formats**: PDF, TXT, CSV, JSON, DOCX, HTML, Markdown
|
|
73
75
|
- Built on LangChain for seamless integration with RAG applications
|
|
74
76
|
- Type-safe implementation with comprehensive error handling
|
|
75
77
|
- Batch processing support for multiple documents
|
|
@@ -115,10 +117,11 @@ for doc in documents:
|
|
|
115
117
|
print(f"Source: {doc.metadata['source']}")
|
|
116
118
|
print(f"Type: {doc.metadata['file_type']}")
|
|
117
119
|
```
|
|
120
|
+
|
|
118
121
|
## License
|
|
119
122
|
|
|
120
123
|
MIT License - see LICENSE file for details.
|
|
121
124
|
|
|
122
125
|
## Contributing
|
|
123
126
|
|
|
124
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
127
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
@@ -11,8 +11,8 @@ A powerful and automated document parser built with LangChain for intelligent do
|
|
|
11
11
|
|
|
12
12
|
## Features
|
|
13
13
|
|
|
14
|
-
- Automatic file type detection based on file extensions
|
|
15
|
-
- Support for multiple document formats
|
|
14
|
+
- **Automatic file type detection** based on file extensions
|
|
15
|
+
- **Support for multiple document formats**: PDF, TXT, CSV, JSON, DOCX, HTML, Markdown
|
|
16
16
|
- Built on LangChain for seamless integration with RAG applications
|
|
17
17
|
- Type-safe implementation with comprehensive error handling
|
|
18
18
|
- Batch processing support for multiple documents
|
|
@@ -58,10 +58,11 @@ for doc in documents:
|
|
|
58
58
|
print(f"Source: {doc.metadata['source']}")
|
|
59
59
|
print(f"Type: {doc.metadata['file_type']}")
|
|
60
60
|
```
|
|
61
|
+
|
|
61
62
|
## License
|
|
62
63
|
|
|
63
64
|
MIT License - see LICENSE file for details.
|
|
64
65
|
|
|
65
66
|
## Contributing
|
|
66
67
|
|
|
67
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
68
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Documentation
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
This directory contains the source files for building the Automated Document Parser documentation using Sphinx.
|
|
5
|
+
|
|
6
|
+
Building the Documentation
|
|
7
|
+
---------------------------
|
|
8
|
+
|
|
9
|
+
To build the HTML documentation:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# From the project root
|
|
13
|
+
make docs
|
|
14
|
+
|
|
15
|
+
# Or from the docs/ directory
|
|
16
|
+
cd docs
|
|
17
|
+
make html
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The generated HTML files will be in `docs/_build/html/`.
|
|
21
|
+
|
|
22
|
+
Viewing the Documentation
|
|
23
|
+
--------------------------
|
|
24
|
+
|
|
25
|
+
After building, you can:
|
|
26
|
+
|
|
27
|
+
1. **Open directly in browser:**
|
|
28
|
+
```bash
|
|
29
|
+
open docs/_build/html/index.html
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
2. **Start a local server:**
|
|
33
|
+
```bash
|
|
34
|
+
make docs-serve
|
|
35
|
+
# Then open http://localhost:8000 in your browser
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Documentation Structure
|
|
39
|
+
-----------------------
|
|
40
|
+
|
|
41
|
+
- `conf.py` - Sphinx configuration file
|
|
42
|
+
- `index.rst` - Main documentation homepage
|
|
43
|
+
- `api.rst` - Complete API reference with autodoc
|
|
44
|
+
- `modules.rst` - Auto-generated module documentation
|
|
45
|
+
- `_static/` - Static files (CSS, images, etc.)
|
|
46
|
+
- `_templates/` - Custom templates
|
|
47
|
+
- `_build/` - Generated documentation (not in git)
|
|
48
|
+
|
|
49
|
+
Makefile Commands
|
|
50
|
+
-----------------
|
|
51
|
+
|
|
52
|
+
From the project root:
|
|
53
|
+
|
|
54
|
+
- `make docs` - Build HTML documentation
|
|
55
|
+
- `make docs-clean` - Clean build directory
|
|
56
|
+
- `make docs-serve` - Start local documentation server
|
|
57
|
+
|
|
58
|
+
From the docs/ directory:
|
|
59
|
+
|
|
60
|
+
- `make html` - Build HTML documentation
|
|
61
|
+
- `make clean` - Clean build directory
|
|
62
|
+
- `make help` - Show all available commands
|
|
63
|
+
|
|
64
|
+
Sphinx Extensions
|
|
65
|
+
-----------------
|
|
66
|
+
|
|
67
|
+
The documentation uses these Sphinx extensions:
|
|
68
|
+
|
|
69
|
+
- **autodoc** - Auto-generate docs from docstrings
|
|
70
|
+
- **napoleon** - Support for Google and NumPy style docstrings
|
|
71
|
+
- **viewcode** - Add links to highlighted source code
|
|
72
|
+
- **intersphinx** - Link to other project documentation
|
|
73
|
+
- **autosummary** - Generate autodoc summaries
|
|
74
|
+
|
|
75
|
+
Theme
|
|
76
|
+
-----
|
|
77
|
+
|
|
78
|
+
Uses the [Read the Docs Sphinx Theme](https://github.com/readthedocs/sphinx_rtd_theme).
|
|
79
|
+
|
|
80
|
+
To install: `uv pip install sphinx-rtd-theme`
|
|
81
|
+
|
|
82
|
+
Contributing to Documentation
|
|
83
|
+
------------------------------
|
|
84
|
+
|
|
85
|
+
When adding new modules or functions, make sure to:
|
|
86
|
+
|
|
87
|
+
1. Write clear docstrings using Google or NumPy style
|
|
88
|
+
2. Include parameter types and return types
|
|
89
|
+
3. Add usage examples where appropriate
|
|
90
|
+
4. Rebuild docs to verify formatting: `make docs`
|
|
91
|
+
|
|
92
|
+
Hosting
|
|
93
|
+
-------
|
|
94
|
+
|
|
95
|
+
The documentation can be easily hosted on:
|
|
96
|
+
|
|
97
|
+
- **Read the Docs** - Connect your GitHub repo
|
|
98
|
+
- **GitHub Pages** - Use `docs/_build/html/` directory
|
|
99
|
+
- **Any static hosting** - Deploy the `_build/html/` folder
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
API Reference
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
This page contains the complete API reference for the Automated Document Parser package.
|
|
5
|
+
|
|
6
|
+
Core Module
|
|
7
|
+
-----------
|
|
8
|
+
|
|
9
|
+
.. automodule:: automated_document_parser.core
|
|
10
|
+
:members:
|
|
11
|
+
:undoc-members:
|
|
12
|
+
:show-inheritance:
|
|
13
|
+
|
|
14
|
+
Configuration
|
|
15
|
+
-------------
|
|
16
|
+
|
|
17
|
+
.. automodule:: automated_document_parser.config
|
|
18
|
+
:members:
|
|
19
|
+
:undoc-members:
|
|
20
|
+
:show-inheritance:
|
|
21
|
+
|
|
22
|
+
Utilities
|
|
23
|
+
---------
|
|
24
|
+
|
|
25
|
+
.. automodule:: automated_document_parser.utils
|
|
26
|
+
:members:
|
|
27
|
+
:undoc-members:
|
|
28
|
+
:show-inheritance:
|
|
29
|
+
|
|
30
|
+
Loaders
|
|
31
|
+
-------
|
|
32
|
+
|
|
33
|
+
Main File Loaders
|
|
34
|
+
~~~~~~~~~~~~~~~~~
|
|
35
|
+
|
|
36
|
+
.. automodule:: automated_document_parser.loaders.file_loaders
|
|
37
|
+
:members:
|
|
38
|
+
:undoc-members:
|
|
39
|
+
:show-inheritance:
|
|
40
|
+
|
|
41
|
+
File Load Module
|
|
42
|
+
~~~~~~~~~~~~~~~~
|
|
43
|
+
|
|
44
|
+
Base File Loader
|
|
45
|
+
^^^^^^^^^^^^^^^^
|
|
46
|
+
|
|
47
|
+
.. automodule:: automated_document_parser.loaders.file_load.base
|
|
48
|
+
:members:
|
|
49
|
+
:undoc-members:
|
|
50
|
+
:show-inheritance:
|
|
51
|
+
|
|
52
|
+
Text File Loader
|
|
53
|
+
^^^^^^^^^^^^^^^^
|
|
54
|
+
|
|
55
|
+
.. automodule:: automated_document_parser.loaders.file_load.text_loader
|
|
56
|
+
:members:
|
|
57
|
+
:undoc-members:
|
|
58
|
+
:show-inheritance:
|
|
59
|
+
|
|
60
|
+
CSV File Loader
|
|
61
|
+
^^^^^^^^^^^^^^^
|
|
62
|
+
|
|
63
|
+
.. automodule:: automated_document_parser.loaders.file_load.csv_loader
|
|
64
|
+
:members:
|
|
65
|
+
:undoc-members:
|
|
66
|
+
:show-inheritance:
|
|
67
|
+
|
|
68
|
+
JSON File Loader
|
|
69
|
+
^^^^^^^^^^^^^^^^
|
|
70
|
+
|
|
71
|
+
.. automodule:: automated_document_parser.loaders.file_load.json_loader
|
|
72
|
+
:members:
|
|
73
|
+
:undoc-members:
|
|
74
|
+
:show-inheritance:
|
|
75
|
+
|
|
76
|
+
DOCX File Loader
|
|
77
|
+
^^^^^^^^^^^^^^^^
|
|
78
|
+
|
|
79
|
+
.. automodule:: automated_document_parser.loaders.file_load.docx_loader
|
|
80
|
+
:members:
|
|
81
|
+
:undoc-members:
|
|
82
|
+
:show-inheritance:
|
|
83
|
+
|
|
84
|
+
HTML File Loader
|
|
85
|
+
^^^^^^^^^^^^^^^^
|
|
86
|
+
|
|
87
|
+
.. automodule:: automated_document_parser.loaders.file_load.html_loader
|
|
88
|
+
:members:
|
|
89
|
+
:undoc-members:
|
|
90
|
+
:show-inheritance:
|
|
91
|
+
|
|
92
|
+
PDF Load Module
|
|
93
|
+
~~~~~~~~~~~~~~~
|
|
94
|
+
|
|
95
|
+
PDF Loader Classes
|
|
96
|
+
^^^^^^^^^^^^^^^^^^
|
|
97
|
+
|
|
98
|
+
.. autoclass:: automated_document_parser.loaders.pdf_load.PDFLoader
|
|
99
|
+
:members:
|
|
100
|
+
:undoc-members:
|
|
101
|
+
:show-inheritance:
|
|
102
|
+
|
|
103
|
+
.. autofunction:: automated_document_parser.loaders.pdf_load.load_pdf
|
|
104
|
+
|
|
105
|
+
.. autoclass:: automated_document_parser.loaders.pdf_load.PDFLoaderMethod
|
|
106
|
+
:members:
|
|
107
|
+
:undoc-members:
|
|
108
|
+
:show-inheritance:
|
|
109
|
+
|
|
110
|
+
Base PDF Loader
|
|
111
|
+
^^^^^^^^^^^^^^^
|
|
112
|
+
|
|
113
|
+
.. automodule:: automated_document_parser.loaders.pdf_load.base
|
|
114
|
+
:members:
|
|
115
|
+
:undoc-members:
|
|
116
|
+
:show-inheritance:
|
|
117
|
+
|
|
118
|
+
PyPDF Loader
|
|
119
|
+
^^^^^^^^^^^^
|
|
120
|
+
|
|
121
|
+
.. automodule:: automated_document_parser.loaders.pdf_load.pypdf_loader
|
|
122
|
+
:members:
|
|
123
|
+
:undoc-members:
|
|
124
|
+
:show-inheritance:
|
|
125
|
+
|
|
126
|
+
Unstructured PDF Loader
|
|
127
|
+
^^^^^^^^^^^^^^^^^^^^^^^
|
|
128
|
+
|
|
129
|
+
.. automodule:: automated_document_parser.loaders.pdf_load.unstructured_loader
|
|
130
|
+
:members:
|
|
131
|
+
:undoc-members:
|
|
132
|
+
:show-inheritance:
|
|
133
|
+
|
|
134
|
+
Amazon Textract Loader
|
|
135
|
+
^^^^^^^^^^^^^^^^^^^^^^
|
|
136
|
+
|
|
137
|
+
.. automodule:: automated_document_parser.loaders.pdf_load.textract_loader
|
|
138
|
+
:members:
|
|
139
|
+
:undoc-members:
|
|
140
|
+
:show-inheritance:
|
|
141
|
+
|
|
142
|
+
Mathpix Loader
|
|
143
|
+
^^^^^^^^^^^^^^
|
|
144
|
+
|
|
145
|
+
.. automodule:: automated_document_parser.loaders.pdf_load.mathpix_loader
|
|
146
|
+
:members:
|
|
147
|
+
:undoc-members:
|
|
148
|
+
:show-inheritance:
|
|
149
|
+
|
|
150
|
+
PDFPlumber Loader
|
|
151
|
+
^^^^^^^^^^^^^^^^^
|
|
152
|
+
|
|
153
|
+
.. automodule:: automated_document_parser.loaders.pdf_load.pdfplumber_loader
|
|
154
|
+
:members:
|
|
155
|
+
:undoc-members:
|
|
156
|
+
:show-inheritance:
|
|
157
|
+
|
|
158
|
+
PyPDFium2 Loader
|
|
159
|
+
^^^^^^^^^^^^^^^^
|
|
160
|
+
|
|
161
|
+
.. automodule:: automated_document_parser.loaders.pdf_load.pypdfium2_loader
|
|
162
|
+
:members:
|
|
163
|
+
:undoc-members:
|
|
164
|
+
:show-inheritance:
|
|
165
|
+
|
|
166
|
+
PyMuPDF Loader
|
|
167
|
+
^^^^^^^^^^^^^^
|
|
168
|
+
|
|
169
|
+
.. automodule:: automated_document_parser.loaders.pdf_load.pymupdf_loader
|
|
170
|
+
:members:
|
|
171
|
+
:undoc-members:
|
|
172
|
+
:show-inheritance:
|
|
173
|
+
|
|
174
|
+
PyMuPDF4LLM Loader
|
|
175
|
+
^^^^^^^^^^^^^^^^^^
|
|
176
|
+
|
|
177
|
+
.. automodule:: automated_document_parser.loaders.pdf_load.pymupdf4llm_loader
|
|
178
|
+
:members:
|
|
179
|
+
:undoc-members:
|
|
180
|
+
:show-inheritance:
|
|
181
|
+
|
|
182
|
+
OpenDataLoader PDF Loader
|
|
183
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
184
|
+
|
|
185
|
+
.. automodule:: automated_document_parser.loaders.pdf_load.opendataloader_loader
|
|
186
|
+
:members:
|
|
187
|
+
:undoc-members:
|
|
188
|
+
:show-inheritance:
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# For the full list of built-in configuration values, see the documentation:
|
|
4
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
|
|
9
|
+
# Add the src directory to the path so Sphinx can find the modules
|
|
10
|
+
sys.path.insert(0, os.path.abspath("../src"))
|
|
11
|
+
|
|
12
|
+
# -- Project information -----------------------------------------------------
|
|
13
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
14
|
+
|
|
15
|
+
project = "Automated Document Parser"
|
|
16
|
+
copyright = "2025, Pulkit Dhingra"
|
|
17
|
+
author = "Pulkit Dhingra"
|
|
18
|
+
release = "0.1.4"
|
|
19
|
+
|
|
20
|
+
# -- General configuration ---------------------------------------------------
|
|
21
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
22
|
+
|
|
23
|
+
extensions = [
|
|
24
|
+
"sphinx.ext.autodoc", # Auto-generate docs from docstrings
|
|
25
|
+
"sphinx.ext.napoleon", # Support for NumPy and Google style docstrings
|
|
26
|
+
"sphinx.ext.viewcode", # Add links to highlighted source code
|
|
27
|
+
"sphinx.ext.intersphinx", # Link to other project's documentation
|
|
28
|
+
"sphinx.ext.autosummary", # Generate autodoc summaries
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
# Napoleon settings for docstring styles
|
|
32
|
+
napoleon_google_docstring = True
|
|
33
|
+
napoleon_numpy_docstring = True
|
|
34
|
+
napoleon_include_init_with_doc = True
|
|
35
|
+
napoleon_include_private_with_doc = False
|
|
36
|
+
napoleon_include_special_with_doc = True
|
|
37
|
+
napoleon_use_admonition_for_examples = False
|
|
38
|
+
napoleon_use_admonition_for_notes = False
|
|
39
|
+
napoleon_use_admonition_for_references = False
|
|
40
|
+
napoleon_use_ivar = False
|
|
41
|
+
napoleon_use_param = True
|
|
42
|
+
napoleon_use_rtype = True
|
|
43
|
+
napoleon_preprocess_types = False
|
|
44
|
+
napoleon_type_aliases = None
|
|
45
|
+
napoleon_attr_annotations = True
|
|
46
|
+
|
|
47
|
+
# Autosummary settings
|
|
48
|
+
autosummary_generate = True
|
|
49
|
+
|
|
50
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
51
|
+
templates_path = ["_templates"]
|
|
52
|
+
|
|
53
|
+
# List of patterns, relative to source directory, that match files and
|
|
54
|
+
# directories to ignore when looking for source files.
|
|
55
|
+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
56
|
+
|
|
57
|
+
# -- Options for HTML output -------------------------------------------------
|
|
58
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
59
|
+
|
|
60
|
+
html_theme = "sphinx_rtd_theme" # Read the Docs theme
|
|
61
|
+
html_static_path = ["_static"]
|
|
62
|
+
|
|
63
|
+
# Theme options
|
|
64
|
+
html_theme_options = {
|
|
65
|
+
"navigation_depth": 4,
|
|
66
|
+
"collapse_navigation": False,
|
|
67
|
+
"sticky_navigation": True,
|
|
68
|
+
"includehidden": True,
|
|
69
|
+
"titles_only": False,
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
# -- Options for autodoc -----------------------------------------------------
|
|
73
|
+
autodoc_default_options = {
|
|
74
|
+
"members": True,
|
|
75
|
+
"member-order": "bysource",
|
|
76
|
+
"special-members": "__init__",
|
|
77
|
+
"undoc-members": True,
|
|
78
|
+
"exclude-members": "__weakref__",
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# -- Intersphinx configuration -----------------------------------------------
|
|
82
|
+
intersphinx_mapping = {
|
|
83
|
+
"python": ("https://docs.python.org/3", None),
|
|
84
|
+
"langchain": ("https://api.python.langchain.com/en/latest/", None),
|
|
85
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
Automated Document Parser Documentation
|
|
2
|
+
========================================
|
|
3
|
+
|
|
4
|
+
Welcome to the Automated Document Parser documentation!
|
|
5
|
+
|
|
6
|
+
**Automated Document Parser** is a powerful and intelligent document processing library built on top of LangChain. It provides automatic file type detection and loading for various document formats, making it easy to build RAG (Retrieval-Augmented Generation) applications.
|
|
7
|
+
|
|
8
|
+
Features
|
|
9
|
+
--------
|
|
10
|
+
|
|
11
|
+
* 🚀 **Automatic File Type Detection** - Intelligently detects and processes 10+ file formats
|
|
12
|
+
* 📄 **Multiple PDF Loaders** - 9 different PDF loading methods for various use cases
|
|
13
|
+
* 🔧 **Modular Architecture** - Clean separation with ``file_load/`` and ``pdf_load/`` modules
|
|
14
|
+
* 🎯 **Easy Integration** - Simple API that works seamlessly with LangChain
|
|
15
|
+
* 📊 **Structured Data Support** - Handle CSV, JSON, and other structured formats
|
|
16
|
+
* 🔌 **Extensible Design** - Easy to add custom loaders
|
|
17
|
+
|
|
18
|
+
Supported File Types
|
|
19
|
+
---------------------
|
|
20
|
+
|
|
21
|
+
**Text Files:**
|
|
22
|
+
- ``.txt`` - Plain text files
|
|
23
|
+
- ``.md`` - Markdown files
|
|
24
|
+
|
|
25
|
+
**Structured Data:**
|
|
26
|
+
- ``.csv`` - CSV files with encoding support
|
|
27
|
+
- ``.json`` - JSON files with jq schema filtering
|
|
28
|
+
|
|
29
|
+
**Documents:**
|
|
30
|
+
- ``.docx`` - Microsoft Word documents
|
|
31
|
+
- ``.html`` - HTML files
|
|
32
|
+
|
|
33
|
+
**PDF Files (9 methods):**
|
|
34
|
+
- ``pypdf`` - Basic PDF text extraction (default)
|
|
35
|
+
- ``unstructured`` - Advanced OCR and layout detection
|
|
36
|
+
- ``amazon_textract`` - AWS Textract for high-accuracy OCR
|
|
37
|
+
- ``mathpix`` - Specialized for mathematical formulas
|
|
38
|
+
- ``pdfplumber`` - High accuracy text and table extraction
|
|
39
|
+
- ``pypdfium2`` - Google PDFium library
|
|
40
|
+
- ``pymupdf`` - PyMuPDF (fitz) backend
|
|
41
|
+
- ``pymupdf4llm`` - LLM-optimized extraction
|
|
42
|
+
- ``opendataloader`` - Advanced multi-format parsing
|
|
43
|
+
|
|
44
|
+
Quick Start
|
|
45
|
+
-----------
|
|
46
|
+
|
|
47
|
+
Installation
|
|
48
|
+
~~~~~~~~~~~~
|
|
49
|
+
|
|
50
|
+
.. code-block:: bash
|
|
51
|
+
|
|
52
|
+
pip install automated-document-parser
|
|
53
|
+
|
|
54
|
+
Basic Usage
|
|
55
|
+
~~~~~~~~~~~
|
|
56
|
+
|
|
57
|
+
.. code-block:: python
|
|
58
|
+
|
|
59
|
+
from automated_document_parser import DocumentParser
|
|
60
|
+
|
|
61
|
+
# Initialize the parser
|
|
62
|
+
parser = DocumentParser()
|
|
63
|
+
|
|
64
|
+
# Parse a single document (auto-detects file type)
|
|
65
|
+
documents = parser.parse("path/to/document.pdf")
|
|
66
|
+
|
|
67
|
+
# Parse multiple documents
|
|
68
|
+
files = ["doc1.txt", "data.csv", "report.pdf"]
|
|
69
|
+
results = parser.parse_multiple(files)
|
|
70
|
+
|
|
71
|
+
Advanced PDF Loading
|
|
72
|
+
~~~~~~~~~~~~~~~~~~~~
|
|
73
|
+
|
|
74
|
+
.. code-block:: python
|
|
75
|
+
|
|
76
|
+
from automated_document_parser.loaders import PDFLoader
|
|
77
|
+
|
|
78
|
+
# Use specific PDF loading method
|
|
79
|
+
loader = PDFLoader("document.pdf", method="pdfplumber")
|
|
80
|
+
documents = loader.load()
|
|
81
|
+
|
|
82
|
+
# Use Mathpix for mathematical content
|
|
83
|
+
loader = PDFLoader(
|
|
84
|
+
"math_paper.pdf",
|
|
85
|
+
method="mathpix",
|
|
86
|
+
mathpix_app_id="your_id",
|
|
87
|
+
mathpix_app_key="your_key"
|
|
88
|
+
)
|
|
89
|
+
documents = loader.load()
|
|
90
|
+
|
|
91
|
+
Direct Loader Usage
|
|
92
|
+
~~~~~~~~~~~~~~~~~~~
|
|
93
|
+
|
|
94
|
+
.. code-block:: python
|
|
95
|
+
|
|
96
|
+
from automated_document_parser.loaders.file_load import (
|
|
97
|
+
TextFileLoader,
|
|
98
|
+
CSVFileLoader,
|
|
99
|
+
JSONFileLoader
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Load text file with specific encoding
|
|
103
|
+
loader = TextFileLoader("file.txt", encoding="utf-8")
|
|
104
|
+
docs = loader.load()
|
|
105
|
+
|
|
106
|
+
# Load CSV file
|
|
107
|
+
csv_loader = CSVFileLoader("data.csv")
|
|
108
|
+
csv_docs = csv_loader.load()
|
|
109
|
+
|
|
110
|
+
Contents
|
|
111
|
+
--------
|
|
112
|
+
|
|
113
|
+
.. toctree::
|
|
114
|
+
:maxdepth: 2
|
|
115
|
+
:caption: API Reference
|
|
116
|
+
|
|
117
|
+
api
|
|
118
|
+
modules
|
|
119
|
+
|
|
120
|
+
.. toctree::
|
|
121
|
+
:maxdepth: 2
|
|
122
|
+
:caption: Additional Resources
|
|
123
|
+
|
|
124
|
+
GitHub Repository <https://github.com/Pulkit12dhingra/automated-document-parser>
|
|
125
|
+
|
|
126
|
+
Indices and tables
|
|
127
|
+
==================
|
|
128
|
+
|
|
129
|
+
* :ref:`genindex`
|
|
130
|
+
* :ref:`modindex`
|
|
131
|
+
* :ref:`search`
|