文本块数据结构
| 10 | |
| 11 | @dataclass |
| 12 | class TextBlock: |
| 13 | """文本块数据结构""" |
| 14 | text: str |
| 15 | polygon: List[Tuple[float, float]] |
| 16 | confidence: float = 1.0 |
| 17 | font_size_px: Optional[float] = None |
| 18 | spans: List[dict] = field(default_factory=list) |
| 19 | font_style: Optional[str] = None |
| 20 | font_weight: Optional[str] = None |
| 21 | font_name: Optional[str] = None |
| 22 | font_color: Optional[str] = None |
| 23 | background_color: Optional[str] = None |
| 24 | is_bold: bool = False |
| 25 | is_italic: bool = False |
| 26 | |
| 27 | |
| 28 | @dataclass |
no outgoing calls
no test coverage detected