View source: R/text_preprocessing.R
load_dictionary | R Documentation |
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
)
dictionary_type |
Type of dictionary to load. For local dictionaries, limited to "disease", "drug", "gene". For MeSH and UMLS, expanded to include more semantic categories. |
custom_path |
Optional path to a custom dictionary file. |
source |
The source to fetch terms from: "local", "mesh", or "umls". |
api_key |
UMLS API key for authentication (required if source = "umls"). |
n_terms |
Number of terms to fetch. |
mesh_query |
Additional query to filter MeSH terms (only if source = "mesh"). |
semantic_type_filter |
Filter by semantic type (used mainly with UMLS). |
sanitize |
Logical. If TRUE, sanitizes the dictionary terms. |
extended_mesh |
Logical. If TRUE and source is "mesh", uses PubMed search for additional terms. |
mesh_queries |
Named list of MeSH queries for different categories (only if extended_mesh = TRUE). |
A data frame containing the dictionary.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.