DocumentLine 類別
內容行物件,代表檔單行上找到的內容。
- 繼承
-
builtins.objectDocumentLine
建構函式
DocumentLine(**kwargs: Any)
方法
from_dict |
將 DocumentLine 圖形中的聽寫轉換為模型本身。 |
get_words |
取得此 DocumentLine 範圍中找到的字組。 |
to_dict |
會傳回 DocumentLine 的聽寫表示。 |
from_dict
將 DocumentLine 圖形中的聽寫轉換為模型本身。
from_dict(data: Dict) -> DocumentLine
參數
名稱 | Description |
---|---|
data
必要
|
DocumentLine 圖形中的字典。 |
傳回
類型 | Description |
---|---|
DocumentLine |
get_words
取得此 DocumentLine 範圍中找到的字組。
get_words() -> Iterable[DocumentWord]
傳回
類型 | Description |
---|---|
<xref:iterable>[DocumentWord]
|
iterable[DocumentWord] |
to_dict
屬性
content
依讀取順序串連包含之元素的內容。
content: str
polygon
線條的周框多邊形。
polygon: Sequence[Point]
spans
在讀取順序串連內容中的行位置。
spans: List[DocumentSpan]