DocumentLine クラス

ドキュメントの 1 行で見つかったコンテンツを表すコンテンツ行オブジェクト。

継承
builtins.object
DocumentLine

コンストラクター

DocumentLine(**kwargs: Any)

メソッド

from_dict

DocumentLine の図形のディクテーションをモデル自体に変換します。

get_words

この DocumentLine のスパンで見つかった単語を取得します。

to_dict

DocumentLine の dict 表現を返します。

from_dict

DocumentLine の図形のディクテーションをモデル自体に変換します。

from_dict(data: Dict) -> DocumentLine

パラメーター

名前 説明
data
必須

DocumentLine の図形のディクショナリ。

戻り値

説明

DocumentLine

get_words

この DocumentLine のスパンで見つかった単語を取得します。

get_words() -> Iterable[DocumentWord]

戻り値

説明
<xref:iterable>[DocumentWord]

iterable[DocumentWord]

to_dict

DocumentLine の dict 表現を返します。

to_dict() -> Dict

戻り値

説明

dict

属性

content

読み取り順序で含まれる要素の連結されたコンテンツ。

content: str

polygon

ラインの境界ポリゴン。

polygon: Sequence[Point]

spans

読み取り順序の連結されたコンテンツ内の行の場所。

spans: List[DocumentSpan]