The acroname engines include methods to generate acronyms and initialisms. acronym() searches for candidates by constructing words from characters provided. Each word constructed is compared to the terms in the dictionary specified, and once a match is found the acronym is returned. initialism() takes the first characters from each word in the string. Both functions can optionally return a tibble, ignore articles, and/or use a "bag of words" approach (for more see mince).
acronym(
input,
dictionary = NULL,
acronym_length = 3,
ignore_articles = TRUE,
alnum_only = TRUE,
timeout = 60,
bow = FALSE,
bow_prop = 0.5,
to_tibble = FALSE
)initialism(
input,
ignore_articles = TRUE,
alnum_only = TRUE,
bow = FALSE,
bow_prop = 0.5,
to_tibble = FALSE
)
Character vector with text to use as the input for the candidate
Character vector containing dictionary of terms from which acronym should be created; default is NULL and hunspell "en_us" dictionary will be used
Number of characters in acronym; default is 3
Logical indicating whether or not articles should be ignored ; default is TRUE
Logical that specifes whether only alphanumeric should be used; default is TRUE
Maximum seconds to spend searching for an acronym; default is 60
Logical for whether or not a "bag of words" approach should be used for "input" vector; default is FALSE
Given bow = TRUE this specifies the proportion of words to sample; ignored if bow = FALSE; default is 0.5
Logical as to whether or not the result should be a tibble; default is FALSE
If to_tibble = FALSE (default), then a character vector containing the name capitalized followed by the original string with letters used in the name capitalized.
If to_tibble = TRUE, then a tibble with the following columns:
formatted: The candidate name and string with letters used capitalized
prefix: The candidate name
suffix: Words used with letters in name capitalized
original: The original string used to construct the name