MCPcopy Create free account
hub / github.com/BIT-DataLab/Edit-Banana / TextBlock

Class TextBlock

modules/text/ocr/base.py:12–25  ·  view source on GitHub ↗

文本块数据结构

Source from the content-addressed store, hash-verified

10
11@dataclass
12class 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

Callers 2

_parse_resultMethod · 0.85
analyze_imageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected