get_extended_prefix_map¶
- get_extended_prefix_map(prefix_priority=None, uri_prefix_priority=None, include_prefixes=False, strict=False, remapping=None, blacklist=None)[source]¶
Get an extended prefix map.
An extended prefix map is a collection of
curies.Record
objects, each of which has the following fields:prefix
- the canonical prefixuri_prefix
- the canonical URI prefix (i.e., namespace)prefix_synonyms
- optional extra prefixes such as capitialization variants. No prefix synonyms are allowed to be duplicate across any canonical prefixes or synonyms in other records in the extended prefixuri_prefix_synonyms
- optional extra URI prefixes such as variants of Identifiers.org URLs, PURLs, etc. No URI prefix synyonms are allowed to be duplicates of either canonical or other URI prefix synonyms.
Extended prefix maps have the benefit over regular prefix maps in that they keep extra information. This can be utilized by
curies.Converter
to make URI compression and CURIE expansion aware of synonyms and other lexical variants. Further, an extended prefix map can be readily collapsed into a normal prefix map by getting theprefix
anduri_prefix
fields.- Parameters:
prefix_priority (
Optional
[Sequence
[str
]]) – The order of metaprefixes OR “preferred” for choosing a primary prefix OR “default” for Bioregistry prefixesuri_prefix_priority (
Optional
[Sequence
[str
]]) – The order of metaprefixes for choosing the primary URI prefix OR “default” for Bioregistry prefixesinclude_prefixes (
bool
) – Should prefixes be included with colon delimiters? Setting this to true makes an “omni”-reverse prefix map that can be used to parse both URIs and CURIEsstrict (
bool
) – If true, errors on URI prefix collisions. If false, sends logging and skips them.remapping (
Optional
[Mapping
[str
,str
]]) – A mapping from bioregistry prefixes to preferred prefixes.blacklist (
Optional
[Collection
[str
]]) – A collection of prefixes to skip
- Return type:
List
[Record
]- Returns:
A list of records for
curies.Converter