gbif / name-parser

The core GBIF scientific name parser library
Apache License 2.0
18 stars 4 forks source link

Add all explicit ranks for sections #96

Closed mdoering closed 11 months ago

mdoering commented 1 year ago

section, series and division are ambiguous ranks that are treated differently in botany and zoology. The rank enum just uses a single entry for the most frequent rank, i.e. section & series is used/ordered in the botanical sense while we place division in the zoological sense and use phylum also for botany (which is equally allowed in the botanical code).

Consider to use explicit ranks for sections at least for both codes, make the code an inherent property of a rank and use it to differentiate the rank when parsing while knowing the code. The zoological use of series is according to Wikipedia not the same. I could not find a single zoological usage of series in ChecklistBank, so maybe there really is no need to add them to the ranks enumeration.

Suggest therefore to replace:

with:

mdoering commented 11 months ago

https://github.com/gbif/name-parser/commit/d1a5d1a5ce1d739f7d72827635bd44ebfa48c6ec