<p align="center">
<a href="https://github.com/ds4sd/docling">
<img loading="lazy" alt="Docling" src="https://github.com/DS4SD/docling/raw/main/docs/assets/docling_processing.png" width="100%"/>
</a>
</p>
# Docling with GoogleOCR
<p align="center">
<a href="https://trendshift.io/repositories/12132" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12132" alt="DS4SD%2Fdocling | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</p>
[![arXiv](https://img.shields.io/badge/arXiv-2408.09869-b31b1b.svg)](https://arxiv.org/abs/2408.09869)
[![Docs](https://img.shields.io/badge/docs-live-brightgreen)](https://ds4sd.github.io/docling/)
[![PyPI version](https://img.shields.io/pypi/v/docling)](https://pypi.org/project/docling/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/docling)](https://pypi.org/project/docling/)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![License MIT](https://img.shields.io/github/license/DS4SD/docling)](https://opensource.org/licenses/MIT)
[![PyPI Downloads](https://static.pepy.tech/badge/docling/month)](https://pepy.tech/projects/docling)
Docling parses documents and exports them to the desired format with ease and speed.
This package differs from the main Docling package as it also includes the Google OCR option.
## Features
* ποΈ Reads popular document formats (PDF, DOCX, PPTX, XLSX, Images, HTML, AsciiDoc & Markdown) and exports to HTML, Markdown and JSON (with embedded and referenced images)
* π Advanced PDF document understanding including page layout, reading order & table structures
* 𧩠Unified, expressive [DoclingDocument](https://ds4sd.github.io/docling/concepts/docling_document/) representation format
* π€ Easy integration with π¦ LlamaIndex & π¦π LangChain for powerful RAG / QA applications
* π OCR support for scanned PDFs with multiple ocr engines.
* π» Simple and convenient CLI
Explore the [documentation](https://ds4sd.github.io/docling/) to discover plenty examples and unlock the full power of Docling!
### Coming soon
* βΎοΈ Equation & code extraction
* π Metadata extraction, including title, authors, references & language
* π¦π Native LangChain extension
## Installation
To use Docling, simply install `extended-docling` from your package manager, e.g. pip:
```bash
pip install extended-docling
```
Works on macOS, Linux and Windows environments. Both x86_64 and arm64 architectures.
More [detailed installation instructions](https://ds4sd.github.io/docling/installation/) are available in the docs.
## Getting started
To convert individual documents, use `convert()`, for example:
```python
from docling.datamodel.base_models import InputFormat
from docling.document_converter import DocumentConverter, PdfFormatOption
from docling.datamodel.pipeline_options import PdfPipelineOptions, GoogleOcrOptions
pipeline_options = PdfPipelineOptions()
pipeline_options.ocr_options = GoogleOcrOptions()
pipeline_options.ocr_options.force_full_page_ocr = True
doc_converter = DocumentConverter(
format_options={
InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)
}
)
source = "https://arxiv.org/pdf/2408.09869"
result = doc_converter.convert(source)
print(result.document.export_to_markdown()) # output: "## Docling Technical Report[...]"
```
More [advanced usage options](https://ds4sd.github.io/docling/usage/) are available in
the docs.
## Documentation
Check out Docling's [documentation](https://ds4sd.github.io/docling/), for details on
installation, usage, concepts, recipes, extensions, and more.
## Examples
Go hands-on with our [examples](https://ds4sd.github.io/docling/examples/),
demonstrating how to address different application use cases with Docling.
## Integrations
To further accelerate your AI application development, check out Docling's native
[integrations](https://ds4sd.github.io/docling/integrations/) with popular frameworks
and tools.
## Get help and support
Please feel free to connect with us using the [discussion section](https://github.com/DS4SD/docling/discussions).
## Technical report
For more details on Docling's inner workings, check out the [Docling Technical Report](https://arxiv.org/abs/2408.09869).
## Contributing
Please read [Contributing to Docling](https://github.com/DS4SD/docling/blob/main/CONTRIBUTING.md) for details.
## References
If you use Docling in your projects, please consider citing the following:
```bib
@techreport{Docling,
author = {Deep Search Team},
month = {8},
title = {Docling Technical Report},
url = {https://arxiv.org/abs/2408.09869},
eprint = {2408.09869},
doi = {10.48550/arXiv.2408.09869},
version = {1.0.0},
year = {2024}
}
```
## License
The Docling codebase is under MIT license.
For individual model usage, please refer to the model licenses found in the original packages.
## IBM β€οΈ Open Source AI
Docling has been brought to you by IBM.
Raw data
{
"_id": null,
"home_page": "https://github.com/DS4SD/docling",
"name": "extended-docling",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "docling, convert, document, pdf, docx, html, markdown, layout model, segmentation, table structure, table former",
"author": "Bushr Haddad",
"author_email": "bushr.haddad@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e8/d0/c04803511e192681a8004fd8f63fe8e1ff0832abd3251aedd2ed9e65e939/extended_docling-2.12.1.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <a href=\"https://github.com/ds4sd/docling\">\n <img loading=\"lazy\" alt=\"Docling\" src=\"https://github.com/DS4SD/docling/raw/main/docs/assets/docling_processing.png\" width=\"100%\"/>\n </a>\n</p>\n\n# Docling with GoogleOCR\n\n<p align=\"center\">\n <a href=\"https://trendshift.io/repositories/12132\" target=\"_blank\"><img src=\"https://trendshift.io/api/badge/repositories/12132\" alt=\"DS4SD%2Fdocling | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/></a>\n</p>\n\n[![arXiv](https://img.shields.io/badge/arXiv-2408.09869-b31b1b.svg)](https://arxiv.org/abs/2408.09869)\n[![Docs](https://img.shields.io/badge/docs-live-brightgreen)](https://ds4sd.github.io/docling/)\n[![PyPI version](https://img.shields.io/pypi/v/docling)](https://pypi.org/project/docling/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/docling)](https://pypi.org/project/docling/)\n[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)\n[![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![License MIT](https://img.shields.io/github/license/DS4SD/docling)](https://opensource.org/licenses/MIT)\n[![PyPI Downloads](https://static.pepy.tech/badge/docling/month)](https://pepy.tech/projects/docling)\n\nDocling parses documents and exports them to the desired format with ease and speed.\nThis package differs from the main Docling package as it also includes the Google OCR option.\n\n## Features\n\n* \ud83d\uddc2\ufe0f Reads popular document formats (PDF, DOCX, PPTX, XLSX, Images, HTML, AsciiDoc & Markdown) and exports to HTML, Markdown and JSON (with embedded and referenced images)\n* \ud83d\udcd1 Advanced PDF document understanding including page layout, reading order & table structures\n* \ud83e\udde9 Unified, expressive [DoclingDocument](https://ds4sd.github.io/docling/concepts/docling_document/) representation format\n* \ud83e\udd16 Easy integration with \ud83e\udd99 LlamaIndex & \ud83e\udd9c\ud83d\udd17 LangChain for powerful RAG / QA applications\n* \ud83d\udd0d OCR support for scanned PDFs with multiple ocr engines.\n* \ud83d\udcbb Simple and convenient CLI\n\nExplore the [documentation](https://ds4sd.github.io/docling/) to discover plenty examples and unlock the full power of Docling!\n\n### Coming soon\n\n* \u267e\ufe0f Equation & code extraction\n* \ud83d\udcdd Metadata extraction, including title, authors, references & language\n* \ud83e\udd9c\ud83d\udd17 Native LangChain extension\n\n## Installation\n\nTo use Docling, simply install `extended-docling` from your package manager, e.g. pip:\n```bash\npip install extended-docling\n```\n\nWorks on macOS, Linux and Windows environments. Both x86_64 and arm64 architectures.\n\nMore [detailed installation instructions](https://ds4sd.github.io/docling/installation/) are available in the docs.\n\n## Getting started\n\nTo convert individual documents, use `convert()`, for example:\n\n```python\nfrom docling.datamodel.base_models import InputFormat\nfrom docling.document_converter import DocumentConverter, PdfFormatOption\nfrom docling.datamodel.pipeline_options import PdfPipelineOptions, GoogleOcrOptions\n\npipeline_options = PdfPipelineOptions()\npipeline_options.ocr_options = GoogleOcrOptions()\npipeline_options.ocr_options.force_full_page_ocr = True\ndoc_converter = DocumentConverter(\n format_options={\n InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)\n }\n)\n\nsource = \"https://arxiv.org/pdf/2408.09869\"\nresult = doc_converter.convert(source)\nprint(result.document.export_to_markdown()) # output: \"## Docling Technical Report[...]\"\n```\n\nMore [advanced usage options](https://ds4sd.github.io/docling/usage/) are available in\nthe docs.\n\n## Documentation\n\nCheck out Docling's [documentation](https://ds4sd.github.io/docling/), for details on\ninstallation, usage, concepts, recipes, extensions, and more.\n\n## Examples\n\nGo hands-on with our [examples](https://ds4sd.github.io/docling/examples/),\ndemonstrating how to address different application use cases with Docling.\n\n## Integrations\n\nTo further accelerate your AI application development, check out Docling's native\n[integrations](https://ds4sd.github.io/docling/integrations/) with popular frameworks\nand tools.\n\n## Get help and support\n\nPlease feel free to connect with us using the [discussion section](https://github.com/DS4SD/docling/discussions).\n\n## Technical report\n\nFor more details on Docling's inner workings, check out the [Docling Technical Report](https://arxiv.org/abs/2408.09869).\n\n## Contributing\n\nPlease read [Contributing to Docling](https://github.com/DS4SD/docling/blob/main/CONTRIBUTING.md) for details.\n\n## References\n\nIf you use Docling in your projects, please consider citing the following:\n\n```bib\n@techreport{Docling,\n author = {Deep Search Team},\n month = {8},\n title = {Docling Technical Report},\n url = {https://arxiv.org/abs/2408.09869},\n eprint = {2408.09869},\n doi = {10.48550/arXiv.2408.09869},\n version = {1.0.0},\n year = {2024}\n}\n```\n\n## License\n\nThe Docling codebase is under MIT license.\nFor individual model usage, please refer to the model licenses found in the original packages.\n\n## IBM \u2764\ufe0f Open Source AI\n\nDocling has been brought to you by IBM.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "SDK and CLI for parsing PDF, DOCX, HTML, and more, to a unified document representation for powering downstream workflows such as gen AI applications, now with Google OCR support.",
"version": "2.12.1",
"project_urls": {
"Homepage": "https://github.com/DS4SD/docling",
"Repository": "https://github.com/DS4SD/docling"
},
"split_keywords": [
"docling",
" convert",
" document",
" pdf",
" docx",
" html",
" markdown",
" layout model",
" segmentation",
" table structure",
" table former"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8b9369b601b5aae8c63c2e1c378706194a0cffa626887c7b5d969e5886b7e6cf",
"md5": "8b3547e596e219ddf21f0b97846dc382",
"sha256": "2b344c3afc60e2925ef7bbd1a77d5e56c1593733c4e647ed26777c2a96315bf7"
},
"downloads": -1,
"filename": "extended_docling-2.12.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8b3547e596e219ddf21f0b97846dc382",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 100748,
"upload_time": "2024-12-30T09:41:35",
"upload_time_iso_8601": "2024-12-30T09:41:35.520022Z",
"url": "https://files.pythonhosted.org/packages/8b/93/69b601b5aae8c63c2e1c378706194a0cffa626887c7b5d969e5886b7e6cf/extended_docling-2.12.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e8d0c04803511e192681a8004fd8f63fe8e1ff0832abd3251aedd2ed9e65e939",
"md5": "2ada75ac3bddaf43105edd4c4b4f5474",
"sha256": "0dd7af4298c9fc4eaed957ff0108e297d20aa95e501594fac4bba292da3e2510"
},
"downloads": -1,
"filename": "extended_docling-2.12.1.tar.gz",
"has_sig": false,
"md5_digest": "2ada75ac3bddaf43105edd4c4b4f5474",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 77012,
"upload_time": "2024-12-30T09:41:40",
"upload_time_iso_8601": "2024-12-30T09:41:40.091170Z",
"url": "https://files.pythonhosted.org/packages/e8/d0/c04803511e192681a8004fd8f63fe8e1ff0832abd3251aedd2ed9e65e939/extended_docling-2.12.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-30 09:41:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DS4SD",
"github_project": "docling",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "extended-docling"
}