MappingSet

class MappingSet(*, purl: str | None = None, name: str, version: str | None = None, license: str | None = None, confidence: float = 1.0)[source]

Bases: BaseModel, ConfidenceMixin, KeyedMixin[(), MappingSetKey]

Represents a set of semantic mappings.

For example, this might correspond to:

  1. All the mappings extracted from an ontology

  2. All the mappings published with a database

  3. All the mappings inferred by SeMRA based on a given configuration

Mostly corresponds to the concept of a SSSOM mapping set, documented in https://mapping-commons.github.io/sssom/MappingSet.

There are the following optional fields:

  1. name

  2. purl (not optional if you’re writing to SSSOM)

  3. version

  4. license

  5. confidence

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

model_config

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

Methods Summary

get_confidence()

Get the explicit confidence for the mapping set.

key()

Get a picklable key representing the mapping set.

Attributes Documentation

model_config = {'frozen': True}

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

Methods Documentation

get_confidence() float[source]

Get the explicit confidence for the mapping set.

key() MappingSetKey[source]

Get a picklable key representing the mapping set.