gbv / jskos-tools

Tools for working with the JSKOS data format.
https://gbv.github.io/jskos-tools/
MIT License
2 stars 0 forks source link

sortConcepts: Improve numerical sorting #30

Open nichtich opened 2 years ago

nichtich commented 2 years ago

Current numerical sorting works by reading notations as numbers. This does not work for notations build of letters and numbers such as https://bartoc.org/en/node/20406/?uri=http%3A%2F%2Furi.gbv.de%2Fterminology%2Fbrunfels%2FMedica#content

Better replace by an algorithm that splits notations into parts of type number (0-9), letters (a-zA-Z), other (everything else) and use these elements for sorting. Example:

nichtich commented 2 years ago

Another use case is https://bartoc.org/en/node/743#content: