exclude_unsure
- exclude_unsure(mappings: Iterable[MappingTypeVar]) Iterable[MappingTypeVar][source]
Exclude usunre mappings.
- Parameters:
mappings – An iterable of semantic mappings
- Returns:
A list of semantic mappings, with all unsure mappings excluded. Mappings are considered unsure when there’s a explicit reviewer agreement of 0.0.
>>> from sssom_pydantic import SemanticMapping, NOT >>> m1 = SemanticMapping.exact("CHEBI:48552", "MESH:D020926") >>> m2 = SemanticMapping.exact("CHEBI:53227", "MESH:D020959", reviewer_agreement=1.0) >>> m3 = SemanticMapping.exact("CHEBI:82761", "MESH:D023082", reviewer_agreement=0.0) >>> assert [m1, m2] == list(exclude_unsure([m1, m2, m3]))