engines {acroname} | R Documentation |
acroname engines
Description
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).
Usage
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
)
Arguments
input |
Character vector with text to use as the input for the candidate |
dictionary |
Character vector containing dictionary of terms from which acronym should be created; default is |
acronym_length |
Number of characters in acronym; default is |
ignore_articles |
Logical indicating whether or not articles should be ignored ; default is |
alnum_only |
Logical that specifes whether only alphanumeric should be used; default is |
timeout |
Maximum seconds to spend searching for an acronym; default is |
bow |
Logical for whether or not a "bag of words" approach should be used for "input" vector; default is |
bow_prop |
Given |
to_tibble |
Logical as to whether or not the result should be a |
Value
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