Repository navigation
Infer a code only from evidence of one code (#60) - #184
Merged
Merged
Conversation
The shape of an authorship no longer sets the nomenclatural code. A year, a comma, a bracketed basionym, an ex-author, filius or a 1753-57 year is citation style that sources follow across codes: TAXREF cites its plants `Coode & Cullen, 1965`, LPSN its bacteria `Lee et al. 2004`, and bacteria share the botanists' `(Basionym) Combination` and `ex`. Measured on the ChecklistBank names that declare a code, a year made ~98% of the botanical and all bacterial names with a year ZOOLOGICAL. The vote tally is gone; a code is set only by: - a code-exclusive rank, from its marker or the caller (sect., pv., ab., ...) - a named hybrid, or sanctioning by Fries or Persoon (BOTANICAL) - Candidatus, Approved Lists, a revived name (BACTERIAL) - a virus shape (VIRUS), a cultivar (CULTIVARS) - nomen oblitum / protectum (ZOOLOGICAL) nom. illeg./inval./cons./... no longer set BOTANICAL: cyanobacteria and the ICNP carry them too. A comma-year still makes a bracketed section an unranked infrageneric name (#171), but no longer sets ZOOLOGICAL. Output that followed the inferred code now stays neutral: a bare trinomial is INFRASPECIFIC_NAME, `Genus (Sub)` INFRAGENERIC_NAME, `m.` INFRASUBSPECIFIC_NAME, labels keep their `subsp.` marker, a botanical autonym keeps its author where written. The zoological ex-swap is unaffected (1 of 1,862 corpus ex rows changes). Dead vote-only state removed (filius, initials-first, manuscript-ex, coded diacritics, species code state). CLB verbatim corpus, estimated from a 945k sample stratified by declared code: ~32.7M of 67.5M names lose an inferred code. Of names with a declared code, ~626k wrong codes go (524k botanical and 78k bacterial names had ZOOLOGICAL) and ~13.8M right ones. Ranks: ~563k SUBSPECIES -> INFRASPECIFIC_NAME, ~28k SUBGENUS -> INFRAGENERIC_NAME, ~3.7k MORPH -> INFRASUBSPECIFIC_NAME. Tests: ~880 inferred code/rank assertions re-baselined; tests about zoological rendering pass a code hint. Goldens re-baselined (2,405 parse rows lose a code, 129 change rank; 31 format rows). Closes #60
`Boletus edulis Bull. : Fr. subsp. edulis` read `Fr.subsp.edulis` as the sanctioning author and lost the subspecies. The colon of Fries or Persoon now continues the species author span before a rank marker, and that species author's sanctioning is botanical evidence too. No such row in the CLB corpus. Refs #60
`Escherichia coli O157:H7 str. K7140` read `O157` as an author and `H7 str.K7140` as his sanctioning author, a botanical code before #60. The serotype's antigenic formula, perhaps after its pathotype (`STEC`), and what follows it are the phrase, with the strain rank after a strain marker, as `Escherichia coli str. K-12` is. CLB verbatim corpus: 1,444 of 2,534 candidate rows change, all to the antigenic formula phrase. Refs #60
) With no code inferred from a year, `Calathus (Lindrothius) Kurnakov, 1961` rendered as `Calathus infragen. Lindrothius`, a marker no one writes. An unranked infrageneric of no code is written in brackets, as a zoological one is; this also replaces `infragen.` for `Agaricus tr. Hypholoma Fr.`. Format golden: 32 rows. Refs #60
ICN Art. 15 sanctions through Persoon's Synopsis and Fries' Systema only. Any other text after a colon was kept as the sanctioning author: page citations and their notes (`Günther, 1875: 231 (fide Smith, 1943)`), HIV and E. coli strain designations (`HIV-1 M:CRF02_AG`). It is now left unparsed. The two are cited in one form, `Fr.` and `Pers.`, whether written `Fr`, `Fries`, `fr.` or `Persoon`; a Fries with initials (`R.E.Fr.`) is another Fries. CLB verbatim corpus, all 1,261,926 rows with a colon: 7,301 lose a fake sanctioning author (its text now unparsed), 53 are normalised to Fr./Pers., 7 `(Wulfen:fr.)` are recognised (BOTANICAL), `Bull.:Pers. sens. Gr` no longer is. Golden: 1 row (`Bold:Aab`). Refs #60
"Agaricus trib. Pholiota Fr." dropped the genus and made Pholiota a
tribe. Fries's tribus of Agaricus are unranked subdivisions of the genus
(ICN Art. F.4.1), as are Hampe's of Hypnum; the parser already read the
short "tr." that way. Now trib./subtrib. after a genus does too, unless a
family-group name stands before or after the marker ("Apocynaceae trib.
Tabernaemontaneae", "Benoistia trib Benoistieae").
"tribus" before a family-group name is a tribe ("Cornaceae tribus
Griselinieae Wangerin"); otherwise it stays an epithet ("Erionota tribus
Evans, 1941").
174 ChecklistBank names become unranked infragenerics in their genus,
4 become tribes.
…kets (#60) Brackets without a marker are for an unranked infrageneric of any code ("Agaricus (Pholiota) Fr.", botanical "Abies (Grandes) sp. 1" instead of the invented "infragen.") and a zoological subgenus. Of no code a subgenus keeps the marker it was written with, as a botanical one must (ICN Art. 21.1); every other rank shows its marker. The parse and format goldens do not change.
…anked (#60) Under the zoological code a bare "Genus (X)" is the subgenus (ICZN Art. 6.1), but a marker that names no rank says otherwise: "Hieracium unr. Verbasciformia", "Viola [unranked] Mirabiles", "Malus nothogrex Prunifoliae" and Fries's "Agaricus trib. Pholiota" stay INFRAGENERIC_NAME with a ZOOLOGICAL hint.
"Rosa div. Caninae" or "Pinus suprasect. Taeda" given as ZOOLOGICAL came back BOTANICAL: the rank's code replaced the caller's, with a warning. Both now stay as given, still with the CODE_MISMATCH warning. The parser no longer overrides a code it was told.
The botanical code writes a subgenus "Costus subg. Metacostus" (ICN Art. 21); zoologists bracket it instead (ICZN Art. 6.1), and the Prokaryotic Code (2025 Revision) writes "subgen." only inside the brackets of a species name (Rule 10c). So the marker follows botany: "Astragalus subg. Cercidothrix", where Java wrote "subgen.". A subgenus with no code keeps the marker. 15 rows of the format golden change only in the marker.
A new section of docs/parsing-examples.md parses each infrageneric example with no code and with the zoological and botanical code given, and states the parsing and formatting rules, so the overview follows the engine whenever the document is regenerated. tools/parsing_examples.py gains an "@by-code" table mode for it.
The Prokaryotic Code (2025 Revision, Rule 10c) cites a subgenus with its author inside the brackets: "Acetobacter (subgen. Gluconoacetobacter Yamada and Kondo 1985) liquefaciens (Asai 1935) Gosselé et al. 1983". The parser read the whole bracket as a basionym author of the genus and left the species unparsed. Now the species parses with its subgenus. The subgenus author has no place in a species' name and is dropped with a "Removed:" warning; on its own it is the subgenus' authorship. 17 ChecklistBank names change, all Moraxella, Acetobacter and Rhodococcus.
Old entomologists divided genera into "div." (Dejean's "Feronia (div. Percus) Dejean, 1828"), which came out as the botanical divisio and BOTANICAL. Like a zoological section (#171) it is now an unranked infrageneric name, under the zoological code or told by a year after a comma. 6 ChecklistBank names change, all insects or scorpions.
The Prokaryotic Code abbreviates subgenus "subgen." (Rules 10c, 34c) and puts the marker inside the brackets of a species name: "Acetobacter (subgen. Gluconoacetobacter) liquefaciens". Under the bacterial code a subgenus on its own is now "Acetobacter subgen. Gluconoacetobacter", and a species shows its subgenus that way. Every other code keeps "subg.", or the bare brackets in a species.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #60.
Without a code from the caller, the parser now sets a nomenclatural code only from evidence that belongs to one code. It no longer guesses from the shape of the authorship.
What still sets a code
×Genus) → BOTANICAL.(ex Author year)→ BACTERIAL.nomen oblitum/nomen protectum→ ZOOLOGICAL.cv., Group or grex → CULTIVARS, as before.What no longer sets a code
(Bas) Comb,ex, filius, 1753–57, coded diacritics,emend..nom. illeg./inval./nud./cons.and the other botanical status terms.Evidence
Measured on a ChecklistBank sample stratified by declared code (945k rows), parsed without a code hint:
(Bas) Combandexcannot tell botanical from bacterial names.Across the full corpus, about 32.7M of 67.5M names lose an inferred code. That removes about 626k wrong codes; about 13.8M correct ones go with them.
Side effects follow the output code
With no code:
r.orst.is INFRASPECIFIC_NAME, not SUBSPECIES (about 563k names);Genus (Sub)is INFRAGENERIC_NAME, not SUBGENUS (about 28k), and still renders in brackets;m.is INFRASUBSPECIFIC_NAME, not MORPH (about 3.7k);subsp.;anon.renders asAnon..Follow-ups in the same branch
Boletus edulis Bull. : Fr. subsp. edulis: the sanctioned species author before a rank marker now parses.Escherichia coli O157:H7 str. K7140→ phraseO157:H7 str. K7140, rank STRAIN (1,444 names).Fr.orPers.whichever form was written (Fries,fr.,Persoon).R.E.Fr.does not count. Any other colon tail, such as page numbers or HIV strain codes, stays inunparsed(7,301 of 1.26M names with a colon).Agaricus tr. Hypholoma Fr.→Agaricus (Hypholoma) Fr.(32 format golden rows).docs/parsing-examples.mdregenerated.Compatibility
codefield stays and only its values change.Infrageneric names
A review of infrageneric names now that the code is often missing. The overview lives in the new "Infrageneric names by code" section of
docs/parsing-examples.md. It parses each example with no code, ZOOLOGICAL and BOTANICAL, and is regenerated with the doc.Genus trib./subtrib. Xis an unranked subdivision of the genus (Fries's tribus, ICN Art. F.4.1), not a tribe that drops the genus (174 names). It is a tribe only next to a family-group name.tribusis a tribe only there too, and otherwise stays an epithet (Erionota tribus Evans, 1941).Genus (X), never of a name whose marker says it is unranked (unr.,[unranked],nothogrex,trib.).subg.as in botany (ICN Art. 21), orsubgen.under the bacterial code, which also puts it inside a species' brackets (Prokaryotic Code 2025, Rule 10c). 15 format golden rows change only in the marker.Acetobacter (subgen. Gluconoacetobacter Yamada and Kondo 1985) liquefaciens. The subgenus author is dropped with aRemoved:warning (17 names).div.within a genus is unranked, like Parse zoological section names - Balanus (sect. Ortho-balanus) Hoek, 1913 #171 sections (6 names, all insects or scorpions).Also adds
VERSIONS.md, a brief history of major changes back to the Java parser.