fuzzy_match() no longer confirms a fuzzy match against
a candidate that drops an
aff./cf./x qualifier present in
the query. Its check_match() confirmation step only
compared word positions up to the shorter of query/candidate, so
Acacia aff. aneura (“resembles Acacia aneura, not
confidently identified”) could fuzzy-match past its qualifier to the
unrelated accepted species Acacia aptaneura instead of
being capped at genus rank. A query containing aff,
cf, or x as a standalone word now requires the
candidate to contain that same token, or the candidate is rejected
outright before the coarser word-position check runs; genuine
aff./cf.-qualified synonyms and named hybrids
that still need fuzzy matching to fix a typo are unaffected.standardise_taxon_rank() no longer corrupts rank values
that are already English, or that merely contain a Latin rank term as a
substring. sectio is a literal prefix of its own
translation (section) and forma sits inside
informal, so replacing either anywhere in the input
silently mangled
section/subsection/zoosection
into
sectionn/subsectionn/zoosectionn,
and informal/informal group into
informl/informl group. Both terms are now
matched only as the last word of the value, which still translates the
prefixed ranks that need it (subsectio,
subforma). APC/APNI rank values are unaffected — the fix
changes output only for the zoological and DwC vocabularies, where it
was found (traitecoevo/taxonAlign#11).standardise_names() no longer rewrites
affinis to aff. when it is the species epithet
of an infraspecific name — that is, when the next word is a rank marker
(subsp., var., f.,
ser., cv. and their unabbreviated or
unpunctuated variants). Previously
Gomphrena affinis subsp. pilbarensis became
Gomphrena aff. subsp. pilbarensis, a name that exists
nowhere, so it could only ever align to genus rank. Eight APC/APNI names
were affected, three of them currently accepted; all now align at their
own rank. A trailing affinis (Acacia affinis)
was already left alone and still is. Two hybrid formulas of the form
Genus affinis x Genus epithet are still rewritten, and are
left for a follow-up.aligned_reason text for fuzzy genus-level
aff./affinis matches
(match_06b/06c/06d), which
previously appended the date without a separating (.align_taxa(full = TRUE) no longer leaks the internal
identifier_string, identifier_string2 and
aligned_name_tmp columns when every name is aligned before
the last match step runs. The output is now the documented set of
columns in all cases.native_anywhere_in_australia() now checks for missing
taxonomic resources before building the state-origin matrix, so an
offline call reports the problem once instead of once per function that
gives up. Its native/introduced test also now reads only the state
columns, so a taxon whose name contains “native” (e.g. the
nativitatis epithets) can no longer be misclassified.match_taxa(): the ~54 match steps
now share helper functions rather than repeating the same block of code.
Alignment output is unchanged.gsub()-wrapper helper
in standardise_names(), strip_names() and
strip_names_extra() is now a single shared
gsub_perl(), and a redundant nested copy of
relevel_taxonomic_status_preferred_order() inside
synonyms_for_accepted_names() has been removed in favour of
the existing top-level function. Behaviour is unchanged.synonyms_for_accepted_names() to list
synonyms for currently accepted taxon names.load_taxonomic_resources() now caches results in memory
for the duration of the R session, so repeated calls with the same
version return immediately without re-downloading or re-processing
data.clear_cached_resources() to remove the
session cache and force a reload.load_taxonomic_resources() now works offline when
parquet files have been previously downloaded;
default_version() falls back to the most recently cached
local version when no internet connection is available.family column added to resource tables.create_species_state_origin_matrix() and
state_diversity_counts() now includes the parameter
include_infrataxa, allowing users to select whether just
species-rank taxa or species and infra-specific taxa are output in the
table. When create_species_state_origin_matrix() is called
by native_anywhere_in_australia(),
include_infrataxa = TRUE is set as the default, so
infrataxa can also be checked by this function.Added get_versions()
Create a genus->family lookup from the specified APC release
Minor update to fix issues
First major release of APCalign. A preprint is available at https://www.biorxiv.org/content/10.1101/2024.02.02.578715v1. Article has been accepted for publication at Australian journal of Botany.
Following review, a number of changes have been implemented. These have sped & streamlined the package.
extract_genusstringr::word that is
much faster.utils::adist to
stringdist::stringdist(method = "dl")standardise_names to remove punctuation from the
start of the stringstrip_names_extra (previously
strip_names_2) to just perform additional functions to
strip_names, rather than repeating those performed by
strip_names.create_taxonomic_update_lookupmatch_taxa.default_versionstandardise_taxon_rank