This function loads pre-defined biomedical dictionaries or fetches terms from MeSH/UMLS.
load_dictionary(
dictionary_type = NULL,
custom_path = NULL,
source = c("local", "mesh", "umls"),
api_key = NULL,
n_terms = 200,
mesh_query = NULL,
semantic_type_filter = NULL,
sanitize = TRUE,
extended_mesh = FALSE,
mesh_queries = NULL
)A data frame containing the dictionary.
Type of dictionary to load. For local dictionaries, limited to "disease", "drug", "gene". For MeSH and UMLS, expanded to include more semantic categories.
Optional path to a custom dictionary file.
The source to fetch terms from: "local", "mesh", or "umls".
UMLS API key for authentication (required if source = "umls").
Number of terms to fetch.
Additional query to filter MeSH terms (only if source = "mesh").
Filter by semantic type (used mainly with UMLS).
Logical. If TRUE, sanitizes the dictionary terms.
Logical. If TRUE and source is "mesh", uses PubMed search for additional terms.
Named list of MeSH queries for different categories (only if extended_mesh = TRUE).