mince {acroname} | R Documentation |
Prepare input string
Description
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".
Usage
mince(
input,
ignore_articles = TRUE,
alnum_only = TRUE,
bow = FALSE,
bow_prop = 0.5
)
Arguments
input |
Character vector with text to use as the input for the candidate |
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 |
bow |
Logical for whether or not a "bag of words" approach should be used for "input" vector; default is |
bow_prop |
Given |
Value
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