Title: | Several Methods for Procedural Name Generation |
---|---|
Description: | A small, dependency-free way to generate random names. Methods provided include the adjective-surname approach of Docker containers ('<https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go>'), and combinations of common English or Spanish words. |
Authors: | Michael Mahoney [aut, cre] |
Maintainer: | Michael Mahoney <[email protected]> |
License: | Apache License (>= 2) |
Version: | 0.2.2.9000 |
Built: | 2024-11-20 05:35:17 UTC |
Source: | https://github.com/mikemahoney218/proceduralnames |
A data set containing 999 of the most common words in the English language. Note that the source does not mention provenance of the list and has been critiqued for diverging from typical lists of the most common words in the English language; as such, this data set is referred to as "common words" rather than "the most common words". The word "slave" has been omitted from the list to avoid insensitive procedural name generation.
common_words
common_words
A character vector with 999 elements, each representing a single word commonly used in the English language.
https://gist.github.com/deekayen/4148741
A data set containing the 108 adjectives used in the naming of Docker containers as of 2020-12-16.
docker_adjectives
docker_adjectives
A character vector with 108 elements, each representing a single adjective used to name Docker containers.
https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go
A data set containing the 237 surnames used in the naming of Docker containers as of 2020-12-16. Each name corresponds to a famous scientist, technologist, or mathematician; see the original source for more information on each name.
docker_names
docker_names
A character vector with 237 elements, each representing a single surname used to name Docker containers.
https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go
This function generates 'n' random names, each combining a single adjective from [docker_adjectives] and a surname from [docker_names].
make_docker_names(n, retry = FALSE, sep = "_")
make_docker_names(n, retry = FALSE, sep = "_")
n |
The number of random names to be generated. |
retry |
If 'TRUE', a random integer between 1 and 10 is appended to each generated name. |
sep |
A character string to separate the terms. Not 'NA_character_'. |
A random name formatted as "adjective_surname" (for example, "focused_turing").
make_docker_names(1) make_docker_names(2, retry = TRUE)
make_docker_names(1) make_docker_names(2, retry = TRUE)
This function generates 'n' random names, each a combination of 'n_words' words selected from [common_words].
make_english_names( n, n_words = 3, retry = FALSE, sep = "_", case = c("lower", "upper", "title") )
make_english_names( n, n_words = 3, retry = FALSE, sep = "_", case = c("lower", "upper", "title") )
n |
The number of random names to be generated. |
n_words |
The number of words to combine into a name. |
retry |
If 'TRUE', a random integer between 1 and 10 is appended to each generated name. |
sep |
A character string to separate the terms. Not 'NA_character_'. |
case |
One of either "lower", "upper", or "title". The capitalization to use for each word. |
A character vector of length 'n' of random names, each composed of 'n_word' terms capitalized according to 'case' separated by 'sep'. Note that names are not guaranteed to be unique.
make_english_names(1, n_words = 2) make_english_names(2, retry = TRUE)
make_english_names(1, n_words = 2) make_english_names(2, retry = TRUE)
Create procedural names.
make_names(corpus, n, n_words, retry, sep = "_", case)
make_names(corpus, n, n_words, retry, sep = "_", case)
corpus |
A vector of strings to build names from. |
n |
The number of random names to be generated. |
n_words |
The number of words to combine into a name. |
retry |
If 'TRUE', a random integer between 1 and 10 is appended to each generated name. |
sep |
A character string to separate the terms. Not 'NA_character_'. |
case |
One of either "lower", "upper", or "title". The capitalization to use for each word. |
A character vector of length 'n' of random names, each composed of 'n_word' terms capitalized according to 'case' separated by 'sep'. Note that names are not guaranteed to be unique.
This function generates 'n' random names, each a combination of 'n_words' words selected from [spanish_words].
make_spanish_names( n, n_words = 3, retry = FALSE, sep = "_", case = c("lower", "upper", "title") )
make_spanish_names( n, n_words = 3, retry = FALSE, sep = "_", case = c("lower", "upper", "title") )
n |
The number of random names to be generated. |
n_words |
The number of words to combine into a name. |
retry |
If 'TRUE', a random integer between 1 and 10 is appended to each generated name. |
sep |
A character string to separate the terms. Not 'NA_character_'. |
case |
One of either "lower", "upper", or "title". The capitalization to use for each word. |
A character vector of length 'n' of random names, each composed of 'n_word' terms capitalized according to 'case' separated by 'sep'. Note that names are not guaranteed to be unique.
make_spanish_names(1, n_words = 2) make_spanish_names(2, retry = TRUE)
make_spanish_names(1, n_words = 2) make_spanish_names(2, retry = TRUE)
A data set containing 820 of the most common words in the Spanish language, as determined by the RAE. Only words which can be represented in UTF-8 are included for compatibility across platforms and collations.
spanish_words
spanish_words
A character vector with 820 elements, each representing a single word commonly used in the Spanish language.
http://corpus.rae.es/lfrecuencias.html