Agent

alignment.Agent()

The author of a match claim — a human annotator or a software aligner.

Attributes

Name Type Description
name str A human-readable label for the agent (a person’s name or a tool’s name).
type AgentType Whether the agent is a human or a piece of software.
identifier str A stable handle for the agent — a URI for a human (e.g. an ORCID), a version string for software (e.g. "v0.20.0").

Examples

>>> Agent(name="J. Doe", type=AgentType.human, identifier="0000-0001")
Agent(name='J. Doe', type="human", identifier='0000-0001')
>>> Agent(name="dtw", type=AgentType.software, identifier="v2")
Agent(name='dtw', type="software", identifier='v2')

Methods

Name Description
from_dict Deserialize from a dictionary (type coerced to AgentType).
to_dict Serialize to a plain dictionary (type as its string value).

from_dict

alignment.Agent.from_dict(data)

Deserialize from a dictionary (type coerced to AgentType).

to_dict

alignment.Agent.to_dict()

Serialize to a plain dictionary (type as its string value).