medkit.core.text.umls_norm_attribute#

Classes#

UMLSNormAttribute

Normalization attribute linking an entity to a CUI in the UMLS knowledge base.

Module Contents#

class medkit.core.text.umls_norm_attribute.UMLSNormAttribute(cui: str, umls_version: str, term: str | None = None, score: float | None = None, sem_types: list[str] | None = None, metadata: dict[str, Any] | None = None, uid: str | None = None)#

Bases: medkit.core.text.entity_norm_attribute.EntityNormAttribute

Normalization attribute linking an entity to a CUI in the UMLS knowledge base.

Attributes:
uidstr

Identifier of the attribute

labelstr

The attribute label, always set to EntityNormAttribute.LABEL

valueAny

CUI prefixed with “umls:” (ex: “umls:C0011849”)

kb_namestr, optional

Name of the knowledge base. Always “umls”

kb_idAny, optional

CUI (Concept Unique Identifier) to which the annotation should be linked

cuistr

Convenience alias of kb_id

kb_versionstr, optional

Version of the UMLS database (ex: “202AB”)

umls_versionstr

Convenience alias of kb_version

termstr, optional

Optional normalized version of the entity text

scorefloat, optional

Optional score reflecting confidence of this link

sem_typeslist of str, optional

Optional IDs of semantic types of the CUI (ex: [“T047”])

metadatadict of str to Any

Metadata of the attribute

sem_types: list[str] | None = None#
property cui#
property umls_version#
to_dict() dict[str, Any]#
classmethod from_dict(data: dict[str, Any]) typing_extensions.Self#

Create an Attribute from a dict.

Parameters:
attribute_dict: dict of str to Any

A dictionary from a serialized Attribute as generated by to_dict()