Skip to content

Commit 19951fb

Browse files
authored
Merge pull request #4 from atlasia-ma/feat/domain-model
feat(domain): geometry, annotation and sample model
2 parents 5c7b060 + bfa0d3e commit 19951fb

6 files changed

Lines changed: 1303 additions & 0 deletions

File tree

src/ocrsmith/domain/__init__.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""Domain model: geometry, annotations and generated samples.
2+
3+
These types are the contract between the renderers that produce pixels and the exporters
4+
that write datasets. They are immutable and pixel-free, so they can be built, reordered
5+
and serialised without touching an image.
6+
"""
7+
8+
from .annotations import (
9+
Line,
10+
Page,
11+
Region,
12+
RegionType,
13+
Table,
14+
TableCell,
15+
Word,
16+
assign_reading_order,
17+
)
18+
from .geometry import BBox, Point, Polygon
19+
from .sample import Provenance, Sample
20+
21+
__all__ = [
22+
"BBox",
23+
"Line",
24+
"Page",
25+
"Point",
26+
"Polygon",
27+
"Provenance",
28+
"Region",
29+
"RegionType",
30+
"Sample",
31+
"Table",
32+
"TableCell",
33+
"Word",
34+
"assign_reading_order",
35+
]

0 commit comments

Comments
 (0)