2024-07-15 09:42:42 +02:00
|
|
|
<p align="center">
|
2024-07-18 11:23:23 +02:00
|
|
|
<a href="https://github.com/ds4sd/docling">
|
2024-10-22 15:29:36 +02:00
|
|
|
<img loading="lazy" alt="Docling" src="https://github.com/DS4SD/docling/raw/main/docs/assets/docling_processing.png" width="100%"/>
|
2024-07-18 11:23:23 +02:00
|
|
|
</a>
|
2024-07-15 09:42:42 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
# Docling
|
|
|
|
|
2024-11-05 13:57:06 +01:00
|
|
|
<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>
|
|
|
|
|
2024-08-20 12:32:53 +02:00
|
|
|
[](https://arxiv.org/abs/2408.09869)
|
2024-10-16 21:02:03 +02:00
|
|
|
[](https://ds4sd.github.io/docling/)
|
2024-07-17 15:49:26 +02:00
|
|
|
[](https://pypi.org/project/docling/)
|
2024-07-18 17:27:48 +02:00
|
|
|

|
2024-07-17 15:49:26 +02:00
|
|
|
[](https://python-poetry.org/)
|
|
|
|
[](https://github.com/psf/black)
|
|
|
|
[](https://pycqa.github.io/isort/)
|
|
|
|
[](https://pydantic.dev)
|
|
|
|
[](https://github.com/pre-commit/pre-commit)
|
2024-07-18 11:23:23 +02:00
|
|
|
[](https://opensource.org/licenses/MIT)
|
2024-07-17 15:49:26 +02:00
|
|
|
|
2024-10-16 21:02:03 +02:00
|
|
|
Docling parses documents and exports them to the desired format with ease and speed.
|
2024-07-15 09:42:42 +02:00
|
|
|
|
|
|
|
## Features
|
2024-10-16 21:02:03 +02:00
|
|
|
|
2024-10-30 15:02:28 +01:00
|
|
|
* 🗂️ Reads popular document formats (PDF, DOCX, PPTX, Images, HTML, AsciiDoc, Markdown) and exports to Markdown and JSON
|
|
|
|
* 📑 Advanced PDF document understanding including page layout, reading order & table structures
|
|
|
|
* 🧩 Unified, expressive [DoclingDocument](https://ds4sd.github.io/docling/concepts/docling_document/) representation format
|
2024-11-05 08:53:02 +01:00
|
|
|
* 🤖 Easy integration with LlamaIndex 🦙 & LangChain 🦜🔗 for powerful RAG / QA applications
|
2024-10-16 21:02:03 +02:00
|
|
|
* 🔍 OCR support for scanned PDFs
|
|
|
|
* 💻 Simple and convenient CLI
|
|
|
|
|
|
|
|
Explore the [documentation](https://ds4sd.github.io/docling/) to discover plenty examples and unlock the full power of Docling!
|
|
|
|
|
2024-11-05 08:53:02 +01:00
|
|
|
### Coming soon
|
|
|
|
|
|
|
|
* ♾️ Equation & code extraction
|
|
|
|
* 📝 Metadata extraction, including title, authors, references & language
|
|
|
|
* 🦜🔗 Native LangChain extension
|
2024-09-02 12:27:29 +02:00
|
|
|
|
2024-07-17 15:49:26 +02:00
|
|
|
## Installation
|
2024-07-15 09:42:42 +02:00
|
|
|
|
2024-07-17 15:49:26 +02:00
|
|
|
To use Docling, simply install `docling` from your package manager, e.g. pip:
|
|
|
|
```bash
|
2024-07-16 14:15:09 +02:00
|
|
|
pip install docling
|
|
|
|
```
|
|
|
|
|
2024-10-03 14:23:47 +02:00
|
|
|
Works on macOS, Linux and Windows environments. Both x86_64 and arm64 architectures.
|
2024-07-16 14:15:09 +02:00
|
|
|
|
2024-10-16 21:02:03 +02:00
|
|
|
More [detailed installation instructions](https://ds4sd.github.io/docling/installation/) are available in the docs.
|
2024-08-30 10:20:21 +02:00
|
|
|
|
2024-09-24 09:21:28 +02:00
|
|
|
## Getting started
|
2024-07-15 09:42:42 +02:00
|
|
|
|
2024-10-18 17:26:48 +05:30
|
|
|
To convert individual documents, use `convert()`, for example:
|
2024-07-26 16:55:33 +02:00
|
|
|
|
|
|
|
```python
|
|
|
|
from docling.document_converter import DocumentConverter
|
|
|
|
|
2024-10-22 15:29:36 +02:00
|
|
|
source = "https://arxiv.org/pdf/2408.09869" # document per local path or URL
|
2024-07-26 16:55:33 +02:00
|
|
|
converter = DocumentConverter()
|
2024-10-16 21:02:03 +02:00
|
|
|
result = converter.convert(source)
|
|
|
|
print(result.document.export_to_markdown()) # output: "## Docling Technical Report[...]"
|
2024-07-17 16:13:21 +02:00
|
|
|
```
|
|
|
|
|
2024-10-16 21:02:03 +02:00
|
|
|
Check out [Getting started](https://ds4sd.github.io/docling/).
|
|
|
|
You will find lots of tuning options to leverage all the advanced capabilities.
|
2024-09-26 21:37:08 +02:00
|
|
|
|
2024-10-16 21:02:03 +02:00
|
|
|
## Get help and support
|
2024-07-15 09:42:42 +02:00
|
|
|
|
2024-10-16 21:02:03 +02:00
|
|
|
Please feel free to connect with us using the [discussion section](https://github.com/DS4SD/docling/discussions).
|
2024-09-27 11:16:04 +02:00
|
|
|
|
2024-09-09 12:03:04 +02:00
|
|
|
## Technical report
|
|
|
|
|
|
|
|
For more details on Docling's inner workings, check out the [Docling Technical Report](https://arxiv.org/abs/2408.09869).
|
|
|
|
|
2024-07-15 09:42:42 +02:00
|
|
|
## Contributing
|
|
|
|
|
2024-07-15 12:43:05 +02:00
|
|
|
Please read [Contributing to Docling](https://github.com/DS4SD/docling/blob/main/CONTRIBUTING.md) for details.
|
2024-07-15 09:42:42 +02:00
|
|
|
|
|
|
|
## References
|
|
|
|
|
2024-07-17 15:49:26 +02:00
|
|
|
If you use Docling in your projects, please consider citing the following:
|
2024-07-15 09:42:42 +02:00
|
|
|
|
|
|
|
```bib
|
2024-08-20 12:32:53 +02:00
|
|
|
@techreport{Docling,
|
|
|
|
author = {Deep Search Team},
|
|
|
|
month = {8},
|
2024-09-09 12:03:04 +02:00
|
|
|
title = {Docling Technical Report},
|
|
|
|
url = {https://arxiv.org/abs/2408.09869},
|
|
|
|
eprint = {2408.09869},
|
|
|
|
doi = {10.48550/arXiv.2408.09869},
|
2024-08-20 12:32:53 +02:00
|
|
|
version = {1.0.0},
|
|
|
|
year = {2024}
|
2024-07-15 09:42:42 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
2024-11-05 08:53:02 +01:00
|
|
|
The Docling codebase is under MIT license.
|
2024-07-15 09:42:42 +02:00
|
|
|
For individual model usage, please refer to the model licenses found in the original packages.
|
2024-11-05 13:57:06 +01:00
|
|
|
|
|
|
|
## IBM ❤️ Open Source AI
|
|
|
|
|
|
|
|
Docling has been brought to you by IBM.
|