Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Establish DoclingDocument format (experimental) #91

Closed
wants to merge 18 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add exporter methods to new types
Signed-off-by: Christoph Auer <[email protected]>
cau-git committed Sep 23, 2024
commit d7907310e5933fabfb3586fa8ab0aabc49e67604
7 changes: 5 additions & 2 deletions docling/datamodel/document.py
Original file line number Diff line number Diff line change
@@ -3,14 +3,15 @@
from pathlib import Path, PurePath
from typing import ClassVar, Dict, Iterable, List, Optional, Tuple, Type, Union

from docling_core.types import BaseCell, BaseText, DoclingDocument
from docling_core.types import BaseCell, BaseText
from docling_core.types import Document as DsDocument
from docling_core.types import DocumentDescription as DsDocumentDescription
from docling_core.types import FileInfoObject as DsFileInfoObject
from docling_core.types import PageDimensions, PageReference, Prov, Ref
from docling_core.types import Table as DsSchemaTable
from docling_core.types.doc.base import BoundingBox as DsBoundingBox
from docling_core.types.doc.base import Figure, TableCell
from docling_core.types.experimental.document import DoclingDocument, FileInfo
from pydantic import BaseModel
from typing_extensions import deprecated

@@ -59,7 +60,9 @@
),
)

_EMPTY_DOCLING_DOC = DoclingDocument(description={}, file_info={}) # TODO: Stub
_EMPTY_DOCLING_DOC = DoclingDocument(
description={}, file_info=FileInfo(document_hash="123xyz")
) # TODO: Stub


class InputDocument(BaseModel):
347 changes: 198 additions & 149 deletions poetry.lock