Element
Element model.
This module defines the Element model.
Reviewers
Timotius Nugroho Chandra (timotius.n.chandra@gdplabs.id)
Element
Bases: BaseModel
An Element model.
This class serves as the Element model for storing element text, structure, and metadata.
Attributes:
Name | Type | Description |
---|---|---|
text |
str
|
The element text. |
structure |
str
|
The element structure. |
metadata |
dict
|
The element metadata. |
from_list_dict(elements)
staticmethod
Convert a list of dictionaries to a list of Element objects.
to_list_dict(elements)
staticmethod
Convert a list of Element objects to a list of dictionaries.