This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Commit 4f7ba1b
authored
refactor: Refactor of hocr functions and fixing lost changes (#137)
* refactor: Reorganize hocr functions
- Use more jinja templating instead of hardcoding strings
- Simplified bounding box function
- Changed parameter name for `_get_hocr_bounding_box` to `page_dimension` for more clarity.
* samples: Added sample for convert to hocr
* refactor: Reordering of classes in page.py
* refactor: Re-added refactoring to remove extra `get_*()` methods in page.py
- Added in #110 Lost in Merge
* fix: Moved `templates` directory into package.
- Required for template to work in installed library1 parent a38b68c commit 4f7ba1b
8 files changed
Lines changed: 206 additions & 444 deletions
File tree
- google/cloud/documentai_toolbox
- templates
- wrappers
- samples/snippets
- templates
- tests/unit
- resources
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
773 | 773 | | |
774 | 774 | | |
775 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
776 | 782 | | |
777 | 783 | | |
778 | 784 | | |
| |||
781 | 787 | | |
782 | 788 | | |
783 | 789 | | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
| 790 | + | |
| 791 | + | |
793 | 792 | | |
794 | | - | |
| 793 | + | |
| 794 | + | |
795 | 795 | | |
0 commit comments