| Title: | Taxonomic Audit, Character Ontology, and Pairwise Diagnosability |
|---|---|
| Description: | Automates the extraction of morphological traits and taxonomic literature auditing from unstructured botanical treatments. Implements controlled ontology mapping, regular expression-based quantitative dimension parsing, benchmark corpus management, and comparative baseline evaluation protocols for biodiversity informatics. |
| Authors: | Aamna Naveed [aut, cre] |
| Maintainer: | Aamna Naveed <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-11-26 03:15:30 UTC |
| Source: | https://github.com/cran/taxaudit |
Calculate Pairwise Diagnosability Index
calculate_DI(taxon_a, taxon_b)calculate_DI(taxon_a, taxon_b)
taxon_a |
Character or numeric vector of character states for taxon A |
taxon_b |
Character or numeric vector of character states for taxon B |
A numeric value representing the Diagnosability Index (0 = identical, 1 = fully disjoint)
Extract Description for a Given Taxon
extract_description(taxon)extract_description(taxon)
taxon |
Character string specifying taxon name |
Character string containing extracted taxonomic description
Calculate Agreement and Overlap Between Two Annotation Sets
ta_audit_agreement(annotations_a, annotations_b)ta_audit_agreement(annotations_a, annotations_b)
annotations_a |
Data frame from Annotator A (must include trait, span_start, span_end). |
annotations_b |
Data frame from Annotator B (must include trait, span_start, span_end). |
A list containing matching statistics and agreement score.
A naive regex-based baseline extractor for comparison against ontology-mapped extraction.
ta_baseline_extract(text)ta_baseline_extract(text)
text |
Character string of a botanical treatment. |
A data frame of naive extracted keyword matches.
Compares naive baseline extraction performance against the taxaudit pipeline.
ta_compare_baseline(corpus)ta_compare_baseline(corpus)
corpus |
Loaded corpus data frame. |
A data frame containing comparative extraction metrics.
Generate a contrast table comparing character states between two taxon treatments
ta_contrast_table(text1, text2, name1 = "Species A", name2 = "Species B")ta_contrast_table(text1, text2, name1 = "Species A", name2 = "Species B")
text1 |
Character string for species 1 description. |
text2 |
Character string for species 2 description. |
name1 |
Character. Name of species 1 (default 'Species A'). |
name2 |
Character. Name of species 2 (default 'Species B'). |
A data frame contrast table.
Extract characters from taxon description text with expanded ontology
ta_extract_characters(text)ta_extract_characters(text)
text |
Character string of the taxon description. |
A list of character categories and extracted states.
Extract Traits with Evidence Spans and Ontology Terms
ta_extract_traits(text)ta_extract_traits(text)
text |
Character string containing treatment text. |
A data frame containing extracted traits, character spans, and ontology metadata.
Fetch botanical treatment text for a given taxon
ta_fetch_treatment(taxon_name)ta_fetch_treatment(taxon_name)
taxon_name |
Character string name of the taxon |
Character string of treatment prose
Generates automated taxonomic ambiguity reports for floristic datasets.
ta_generate_report(flora_list, output_dir = tempdir())ta_generate_report(flora_list, output_dir = tempdir())
flora_list |
Named list of taxon descriptions. |
output_dir |
Directory path to save output reports and data. |
Invisibly returns a list containing audit summary statistics and results.
Retrieves the controlled vocabulary and categorical trait definitions used for botanical literature auditing.
ta_get_ontology()ta_get_ontology()
A named list where each element represents a botanical trait
category (e.g., leaf shape, indumentum) containing a character vector
of valid state terms.
ontology <- ta_get_ontology() names(ontology) head(ontology$leaf_shape)ontology <- ta_get_ontology() names(ontology) head(ontology$leaf_shape)
Retrieves the gold-standard benchmark corpus containing plant treatments, morphological traits, and evidence spans from package internal files.
ta_load_corpus()ta_load_corpus()
A data.frame containing gold-standard plant treatments, traits, and evidence spans.
corpus <- ta_load_corpus() head(corpus)corpus <- ta_load_corpus() head(corpus)
Calculate Pairwise Diagnosability Index (DI) between two species character profiles
ta_pairwise_di(chars1, chars2)ta_pairwise_di(chars1, chars2)
chars1 |
Named list of character states for species 1. |
chars2 |
Named list of character states for species 2. |
A list containing the DI score and differentiating characters.
Parse a cached taxonomic treatment HTML file
ta_parse_treatment(html_path)ta_parse_treatment(html_path)
html_path |
Character. Path to the cached HTML file. |
A data frame containing extracted treatment text and status.
Plot Pairwise Diagnosability Index Heatmap
ta_plot_heatmap(batch_results)ta_plot_heatmap(batch_results)
batch_results |
Data frame resulting from batch pairwise audits. |
A ggplot object.
Resolve and Standardize Taxonomic Names
ta_resolve_names(taxon_names, synonym_db = NULL)ta_resolve_names(taxon_names, synonym_db = NULL)
taxon_names |
Character vector of taxon names to resolve. |
synonym_db |
Optional data frame containing 'Synonym' and 'Accepted' columns. If NULL, uses built-in default mappings. |
A data frame containing original names, resolved accepted names, and resolution status.
Run a complete botanical trait audit for a taxon
ta_run_audit(taxon)ta_run_audit(taxon)
taxon |
Character string name of the taxon or path to treatment file |
A structured list containing audit results and extracted traits
Run taxonomic audit across multiple treatment URLs
ta_run_batch_audit(urls)ta_run_batch_audit(urls)
urls |
Character vector of treatment URLs. |
A combined data frame containing audit results for all successfully processed taxa.
Split Corpus Data for Held-Out Evaluation
ta_split_evaluation( corpus_df, holdout_type = c("taxon", "source"), target_holdout )ta_split_evaluation( corpus_df, holdout_type = c("taxon", "source"), target_holdout )
corpus_df |
Data frame containing the annotated corpus (must include columns like taxon and source). |
holdout_type |
Character string: either "taxon" or "source". |
target_holdout |
Value of the taxon or source to hold out (e.g., "Cedrus deodara" or "Flora of Pakistan Vol 2"). |
A list with training/evaluation data splits.