Generate random "proquint" identifiers. "proquint" stands for PRO-nouncable QUINT-uplets and were described by Daniel Wilkerson in https://arxiv.org/html/0901.4016. Each "word" takes one of 2^16 possibilities. A four word proquint has a keyspace of 10^19 possibilities but takes only 23 characters. Proquint identifiers can be interchanged with integers (though this is totally optional); see proquint_to_int and the other functions documented on that page.

proquint(
  n = 1,
  n_words = 2L,
  use_cache = TRUE,
  global = TRUE,
  use_openssl = NULL
)

Arguments

n

number of ids to return. If NULL, it instead returns the generating function

n_words

The number of words for each identifier; each word has 2^16 (65536) possible combinations, a two-word proquint has 2^32 possible combinations and an k-word proquint has 2^(k * 16) possible combinations.

use_cache

Because there are relatively few combinations per word, and because constructing short strings is relatively expensive in R, it may be useful to cache all 65536 possible words. If TRUE then the first time that this function is used all words will be cached and the results used - the first time may take up to ~1/4 of a second and subsequent calls will be much faster. The identifiers selected will not change with this option (i.e., given a particular random seed, changing this option will not affect the identifiers randomly selected).

global

Use global random number generator that responds to set.seed (see random_id for details, but note that the default here is different).

use_openssl

Use openssl for random number generation when using a non-global generator (see random_id for details)

Details

In the abstract of their paper, Wilkerson introduces proquints:

"Identifiers (IDs) are pervasive throughout our modern life. We suggest that these IDs would be easier to manage and remember if they were easily readable, spellable, and pronounceable. As a solution to this problem we propose using PRO-nouncable QUINT-uplets of alternating unambiguous consonants and vowels: proquints."

Examples

# A single, two word, proquint
ids::proquint()
#> [1] "mabuf-bufav"

# Longer identifier:
ids::proquint(n_words = 5)
#> [1] "diluh-hamok-dujug-mikif-vopos"

# More identifiers
ids::proquint(10)
#>  [1] "zupak-sunid" "nitak-rapaz" "motig-fizad" "zagim-ninob" "kipus-rabum"
#>  [6] "hutul-popad" "honot-kabis" "dalom-sahik" "buzin-toroz" "lokot-zilit"