You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,37 +36,37 @@ poetry run pytest test
36
36
- You can validate your JSON objects using the pydantic class definition.
37
37
38
38
```py
39
-
from docling_core.types importDocument
39
+
from docling_core.types importDoclingDocument
40
40
41
41
data_dict = {...} # here the object you want to validate, as a dictionary
42
-
Document.model_validate(data_dict)
42
+
DoclingDocument.model_validate(data_dict)
43
43
44
44
data_str = {...} # here the object as a JSON string
45
-
Document.model_validate_json(data_str)
45
+
DoclingDocument.model_validate_json(data_str)
46
46
```
47
47
48
48
- You can generate the JSON schema of a model with the script `generate_jsonschema`.
49
49
50
50
```py
51
-
# for the `Document` type
52
-
generate_jsonschema Document
51
+
# for the `DoclingDocument` type
52
+
generate_jsonschema DoclingDocument
53
53
54
54
# for the use `Record` type
55
55
generate_jsonschema Record
56
56
```
57
57
58
58
## Documentation
59
59
60
-
Docling supports 3 main data types:
60
+
Docling Core contains 3 top-level data types:
61
61
62
-
-**Document** for publications like books, articles, reports, or patents. When Docling converts an unstructured PDF document, the generated JSON follows this schema.
63
-
The Document type also models the metadata that may be attached to the converted document.
64
-
Check [Document](docs/Document.json) for the full JSON schema.
62
+
-**DoclingDocument** for publications like books, articles, reports, or patents. When Docling converts an unstructured PDF document, the generated JSON follows this schema.
63
+
The DoclingDocument type also models the metadata that may be attached to the converted document.
64
+
Check [DoclingDocument](docs/DoclingDocument.json) for the full JSON schema.
65
65
-**Record** for structured database records, centered on an entity or _subject_ that is provided with a list of attributes.
66
66
Related to records, the statements can represent annotations on text by Natural Language Processing (NLP) tools.
67
-
Check [Record](docs/Record.json) for the full JSON schema.
67
+
Check [Record](docs/Record.json) for the full JSON schema.
68
68
-**Generic** for any data representation, ensuring minimal configuration and maximum flexibility.
69
-
Check [Generic](docs/Generic.json) for the full JSON schema.
69
+
Check [Generic](docs/Generic.json) for the full JSON schema.
70
70
71
71
The data schemas are defined using [pydantic](https://pydantic-docs.helpmanual.io/) models, which provide built-in processes to support the creation of data that adhere to those models.
0 commit comments