This function is for people who are not in the position to make the sustainable fix, and want to automate
the assignment of which is the preferred prefix. It uses a deterministic algorithm to choose from two or more
CURIE prefixes that have the same URI prefix and generate an extended prefix map in which they have bene collapsed
into a single record. More specitically, the algorithm is based on a case-sensitive lexical sort of the prefixes.
The first in the sort order becomes the primary prefix and the others become synonyms in the resulting record.
[x] Implement function to deterministically make an EPM from a non-bijective prefix map
[x] Pick a better name for this function
[x] Implement first unit test
[x] Think through this harder and implement more unit tests
[x] Improve the function's docs
[x] Add params/returns
[x] Add examples inside the function
[x] Add tutorial that gives context to this function (e.g., why do people get in the situation where they have non-bijective prefix maps, what are the consequences of making an automated approach to solving data issues vs. actually solving the data issue upstream).
Motivated by https://github.com/mapping-commons/sssom-py/pull/485. Demo:
This function is for people who are not in the position to make the sustainable fix, and want to automate the assignment of which is the preferred prefix. It uses a deterministic algorithm to choose from two or more CURIE prefixes that have the same URI prefix and generate an extended prefix map in which they have bene collapsed into a single record. More specitically, the algorithm is based on a case-sensitive lexical sort of the prefixes. The first in the sort order becomes the primary prefix and the others become synonyms in the resulting record.
cc @joeflack4