|
1 | 1 | """Package for models defined by the Document type.""" |
2 | 2 |
|
3 | | -from .base import BoundingBox, CoordOrigin, ImageRefMode, Size |
4 | | -from .document import ( |
5 | | - AnyTableCell, |
| 3 | +from docling_core.types.doc.base import ( |
| 4 | + BoundingBox, |
| 5 | + CoordOrigin, |
| 6 | + ImageRefMode, |
| 7 | + PydanticSerCtxKey, |
| 8 | + Size, |
| 9 | +) |
| 10 | +from docling_core.types.doc.common.annotations import ( |
6 | 11 | BaseAnnotation, |
| 12 | + DescriptionAnnotation, |
| 13 | + MiscAnnotation, |
| 14 | +) |
| 15 | +from docling_core.types.doc.common.content_layer import ContentLayer |
| 16 | +from docling_core.types.doc.common.formatting import ( |
| 17 | + Formatting, |
| 18 | + Script, |
| 19 | +) |
| 20 | +from docling_core.types.doc.common.meta import ( |
7 | 21 | BaseMeta, |
8 | 22 | BasePrediction, |
9 | | - ChartBar, |
10 | | - ChartLine, |
11 | | - ChartPoint, |
12 | | - ChartSlice, |
13 | | - ChartStackedBar, |
14 | | - CodeItem, |
15 | | - ContentLayer, |
16 | | - DescriptionAnnotation, |
| 23 | + CodeMetaField, |
17 | 24 | DescriptionMetaField, |
18 | | - DocItem, |
19 | | - DoclingDocument, |
20 | | - DocTagsDocument, |
21 | | - DocTagsPage, |
22 | | - DocumentOrigin, |
23 | 25 | EntitiesMetaField, |
24 | 26 | EntityMention, |
25 | | - FloatingItem, |
26 | 27 | FloatingMeta, |
27 | | - Formatting, |
| 28 | + KeywordsMetaField, |
| 29 | + LanguageMetaField, |
| 30 | + MetaFieldName, |
| 31 | + MetaUtils, |
| 32 | + SummaryMetaField, |
| 33 | + TopicsMetaField, |
| 34 | +) |
| 35 | +from docling_core.types.doc.common.origin import ( |
| 36 | + DocumentOrigin, |
| 37 | +) |
| 38 | +from docling_core.types.doc.common.reference import ( |
| 39 | + FineRef, |
| 40 | + ImageRef, |
| 41 | + PageItem, |
| 42 | + ProvenanceItem, |
| 43 | + RefItem, |
| 44 | +) |
| 45 | +from docling_core.types.doc.common.scalars import ( |
| 46 | + CharSpan, |
| 47 | + LevelNumber, |
| 48 | + Uint64, |
| 49 | +) |
| 50 | +from docling_core.types.doc.common.source import ( |
| 51 | + BaseSource, |
| 52 | + SourceType, |
| 53 | + TrackSource, |
| 54 | +) |
| 55 | +from docling_core.types.doc.doctags import ( |
| 56 | + DocTagsDocument, |
| 57 | + DocTagsPage, |
| 58 | +) |
| 59 | +from docling_core.types.doc.document import DoclingDocument |
| 60 | +from docling_core.types.doc.items.code import CodeItem |
| 61 | +from docling_core.types.doc.items.content import ContentItem |
| 62 | +from docling_core.types.doc.items.form import ( |
| 63 | + FieldHeadingItem, |
| 64 | + FieldItem, |
| 65 | + FieldRegionItem, |
| 66 | + FieldValueItem, |
| 67 | +) |
| 68 | +from docling_core.types.doc.items.group import ( |
| 69 | + GroupItem, |
| 70 | + InlineGroup, |
| 71 | + ListGroup, |
| 72 | + OrderedList, |
| 73 | + UnorderedList, |
| 74 | +) |
| 75 | +from docling_core.types.doc.items.key_value import ( |
28 | 76 | FormItem, |
29 | | - FormulaItem, |
30 | 77 | GraphCell, |
31 | 78 | GraphData, |
32 | 79 | GraphLink, |
33 | | - GroupItem, |
34 | | - ImageRef, |
35 | | - InlineGroup, |
36 | 80 | KeyValueItem, |
37 | | - KeywordsMetaField, |
38 | | - LanguageMetaField, |
39 | | - ListGroup, |
40 | | - ListItem, |
41 | | - MetaFieldName, |
42 | | - MetaUtils, |
43 | | - MiscAnnotation, |
44 | | - MoleculeMetaField, |
| 81 | +) |
| 82 | +from docling_core.types.doc.items.node import ( |
| 83 | + DocItem, |
| 84 | + FloatingItem, |
45 | 85 | NodeItem, |
46 | | - OrderedList, |
47 | | - Orientation, |
48 | | - PageItem, |
| 86 | +) |
| 87 | +from docling_core.types.doc.items.picture.charts import ( |
| 88 | + ChartBar, |
| 89 | + ChartLine, |
| 90 | + ChartPoint, |
| 91 | + ChartSlice, |
| 92 | + ChartStackedBar, |
49 | 93 | PictureBarChartData, |
50 | 94 | PictureChartData, |
| 95 | + PictureLineChartData, |
| 96 | + PicturePieChartData, |
| 97 | + PictureScatterChartData, |
| 98 | + PictureStackedBarChartData, |
| 99 | + PictureTabularChartData, |
| 100 | +) |
| 101 | +from docling_core.types.doc.items.picture.classification import ( |
51 | 102 | PictureClassificationClass, |
52 | 103 | PictureClassificationData, |
| 104 | +) |
| 105 | +from docling_core.types.doc.items.picture.meta import ( |
| 106 | + MoleculeMetaField, |
53 | 107 | PictureClassificationMetaField, |
54 | 108 | PictureClassificationPrediction, |
| 109 | + PictureMeta, |
| 110 | + TabularChartMetaField, |
| 111 | +) |
| 112 | +from docling_core.types.doc.items.picture.molecule import PictureMoleculeData |
| 113 | +from docling_core.types.doc.items.picture.picture import ( |
| 114 | + BasePictureData, |
55 | 115 | PictureDataType, |
| 116 | + PictureDescriptionData, |
56 | 117 | PictureItem, |
57 | | - PictureLineChartData, |
58 | | - PictureMeta, |
59 | | - PictureMoleculeData, |
60 | | - PicturePieChartData, |
61 | | - PictureScatterChartData, |
62 | | - PictureStackedBarChartData, |
63 | | - PictureTabularChartData, |
64 | | - ProvenanceItem, |
65 | | - RefItem, |
66 | | - RichTableCell, |
67 | | - Script, |
68 | | - SectionHeaderItem, |
69 | | - SourceType, |
70 | | - SummaryMetaField, |
| 118 | + PictureMiscData, |
| 119 | +) |
| 120 | +from docling_core.types.doc.items.table.table import ( |
71 | 121 | TableAnnotationType, |
| 122 | + TableItem, |
| 123 | +) |
| 124 | +from docling_core.types.doc.items.table.table_data import ( |
| 125 | + AnyTableCell, |
| 126 | + Orientation, |
| 127 | + RichTableCell, |
72 | 128 | TableCell, |
73 | 129 | TableData, |
74 | | - TableItem, |
75 | | - TabularChartMetaField, |
| 130 | +) |
| 131 | +from docling_core.types.doc.items.text import ( |
| 132 | + FormulaItem, |
| 133 | + ListItem, |
| 134 | + SectionHeaderItem, |
76 | 135 | TextItem, |
77 | 136 | TitleItem, |
78 | | - TopicsMetaField, |
79 | | - TrackSource, |
80 | | - UnorderedList, |
81 | 137 | ) |
82 | | -from .labels import ( |
| 138 | +from docling_core.types.doc.labels import ( |
83 | 139 | CodeLanguageLabel, |
84 | 140 | DocItemLabel, |
85 | 141 | GraphCellLabel, |
|
89 | 145 | PictureClassificationLabel, |
90 | 146 | TableCellLabel, |
91 | 147 | ) |
92 | | -from .page import ( |
| 148 | +from docling_core.types.doc.page import ( |
| 149 | + BitmapResource, |
93 | 150 | BoundingRectangle, |
| 151 | + ColorChannelValue, |
94 | 152 | ColorMixin, |
95 | 153 | ColorRGBA, |
96 | 154 | Coord2D, |
97 | 155 | OrderedElement, |
| 156 | + PageGeometry, |
| 157 | + PageNumber, |
| 158 | + ParsedPdfDocument, |
98 | 159 | PdfCellRenderingMode, |
| 160 | + PdfHyperlink, |
| 161 | + PdfLine, |
| 162 | + PdfMetaData, |
99 | 163 | PdfPageBoundaryType, |
| 164 | + PdfPageGeometry, |
| 165 | + PdfShape, |
| 166 | + PdfTableOfContents, |
| 167 | + PdfTextCell, |
| 168 | + PdfWidget, |
| 169 | + SegmentedPage, |
| 170 | + SegmentedPdfPage, |
100 | 171 | TextCell, |
101 | 172 | TextCellUnit, |
102 | 173 | TextDirection, |
103 | 174 | ) |
104 | | -from .tokens import DocumentToken, TableToken |
| 175 | +from docling_core.types.doc.tokens import ( |
| 176 | + DocumentToken, |
| 177 | + TableToken, |
| 178 | +) |
| 179 | +from docling_core.types.doc.webvtt import ( |
| 180 | + WebVTTCueBlock, |
| 181 | + WebVTTCueBoldSpan, |
| 182 | + WebVTTCueClassSpan, |
| 183 | + WebVTTCueComponent, |
| 184 | + WebVTTCueComponentBase, |
| 185 | + WebVTTCueComponentWithTerminator, |
| 186 | + WebVTTCueIdentifier, |
| 187 | + WebVTTCueInternalText, |
| 188 | + WebVTTCueItalicSpan, |
| 189 | + WebVTTCueLanguageSpan, |
| 190 | + WebVTTCueLanguageSpanStartTag, |
| 191 | + WebVTTCueSpanStartTag, |
| 192 | + WebVTTCueSpanStartTagAnnotated, |
| 193 | + WebVTTCueTextSpan, |
| 194 | + WebVTTCueTimings, |
| 195 | + WebVTTCueUnderlineSpan, |
| 196 | + WebVTTCueVoiceSpan, |
| 197 | + WebVTTFile, |
| 198 | + WebVTTLineTerminator, |
| 199 | + WebVTTTimestamp, |
| 200 | +) |
0 commit comments