SimpleEvidence

class SimpleEvidence(*, evidence_type: Literal['simple'] = 'simple', justification: NormalizedNamableReference = NormalizedNamableReference(prefix='semapv', identifier='UnspecifiedMapping', name=None), mapping_set: MappingSet, author: NormalizedNamableReference | None = None, confidence: float | None = None)[source]

Bases: BaseModel, KeyedMixin[(typing.Union[curies.triples.Triple, ForwardRef(‘Mapping’)],), tuple[StrTriple, SimpleEvidenceKey]], EvidenceMixin, ConfidenceMixin

Evidence for a mapping.

Ideally, this matches the SSSOM data model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Attributes Summary

mapping_set_names

Get a set containing 1 element - this evidence's mapping set's name.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Summary

get_confidence()

Get the confidence from the mapping set.

key(triple)

Get a key suitable for hashing the evidence.

Attributes Documentation

mapping_set_names

Get a set containing 1 element - this evidence’s mapping set’s name.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Documentation

get_confidence() float[source]

Get the confidence from the mapping set.

key(triple: Triple | Mapping) tuple[StrTriple, SimpleEvidenceKey][source]

Get a key suitable for hashing the evidence.

Returns:

A key for deduplication based on the mapping set.

Note: this should be extended to include basically _all_ fields