Document
A text with its annotations.
Usage
Document(
*, text, entities=(), relations=(), segments=(), id=None, metadata=None
)On construction, missing entity IDs become T<n> and missing relation IDs R<n> (the next free numbers), and the document is validated: every span and segment lies inside the text, IDs are unique, and every member and trigger refers to something that exists.
Parameter Attributes
text: strentities: Iterable[Entity] = ()relations: Iterable[Relation] = ()segments: Iterable[Segment] = ()id: str | None = Nonemetadata: Mapping[str, Any] | None = None
Methods
| Name | Description |
|---|---|
| entity() | Look up an entity by ID. |
entity()
Look up an entity by ID.
Usage
entity(id)