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 NULL and hunspell "en_us" dictionary will be used

acronym_length

Number of characters in acronym; default is 3

ignore_articles

Logical indicating whether or not articles should be ignored ; default is TRUE

alnum_only

Logical that specifes whether only alphanumeric should be used; default is TRUE

timeout

Maximum seconds to spend searching for an acronym; default is 60

bow

Logical for whether or not a "bag of words" approach should be used for "input" vector; default is FALSE

bow_prop

Given bow = TRUE this specifies the proportion of words to sample; ignored if bow = FALSE; default is 0.5

to_tibble

Logical as to whether or not the result should be a tibble; default is FALSE

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:


[Package acroname version 0.1.0 Index]