This helper is used by both acronym and initialism to extract elements needed from the input string.
If the function is used with bow = TRUE the input will be processed with a "bag of words" approach, by which words will be shuffled and sampled without replacement. In this case, the number of characters used will be determined by the proportion passed to "bow_prop".
mince(
input,
ignore_articles = TRUE,
alnum_only = TRUE,
bow = FALSE,
bow_prop = 0.5
)Character vector with text to use as the input for the candidate
Logical indicating whether or not articles should be ignored ; default is TRUE
Logical that specifes whether only alphanumeric should be used; default is TRUE
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
Named list with the following elements:
words: Vector with one element per word to be used in the acronym or initialism
collapsed: Vector of length 1 containing all characters from words collapsed
words_len: Vector containing length of each word
first_chars: Vector containing first character from each word