This is an unexported helper for acronym. The function is used wrapped in a tryCatch() that uses withTimeout to manage maximum wait time for the candidate acronym search.
find_candidate(collapsed, acronym_length, probs, dictionary, words_len)The collapsed string of characters generated by mince
Number of characters in acronym; default is 3
Vector of probabilities for selecting each character while generating candidate
Character vector containing dictionary of terms from which acronym should be created; default is NULL and hunspell "en_us" dictionary will be used
Vector of the length of each word in the input
Named list with three elements:
formatted: The candidate acronym and string with letters used capitalized
prefix: The candidate acronym
suffix: Words used with letters in acronym capitalized #'