Candidate
yosoi.contracts.Candidate
class Candidate(ImmutableModel):
Grouping metadata for generated typed candidate records.
Attributes: document_id: Document supplying candidate findings. region: Repeated-region lineage, or None for page grouping. Generated subclasses add named CandidateField members.
Source: python/yosoi/contracts.py:327
Members below are declared on this class. Inherited Pydantic methods and generated constructor signatures are not expanded.
Fields and class attributes
Section titled “Fields and class attributes”document_id: str
region: RegionLineage | None = None
Methods
Section titled “Methods”fields
Section titled “fields”@property
def fields(self) -> dict[str, CandidateField]:
Return field evidence keyed by authored native field ID.
The mapping is a fresh dictionary; its frozen CandidateField values retain ordered findings without copying projected source content.
Source: python/yosoi/contracts.py:340
def field(self, field_id: str | FieldId) -> CandidateField:
Return one candidate field by its authored native field ID.