Package 'proceduralnames'

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-08-30 02:37:05 UTC
Source: https://github.com/mikemahoney218/proceduralnames

Help Index


999 of the most common words in the English language

Description

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.

Usage

common_words

Format

A character vector with 999 elements, each representing a single word commonly used in the English language.

Source

https://gist.github.com/deekayen/4148741


Adjectives used in the procedural naming of Docker containers.

Description

A data set containing the 108 adjectives used in the naming of Docker containers as of 2020-12-16.

Usage

docker_adjectives

Format

A character vector with 108 elements, each representing a single adjective used to name Docker containers.

Source

https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go


Surnames used in the procedural naming of Docker containers.

Description

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.

Usage

docker_names

Format

A character vector with 237 elements, each representing a single surname used to name Docker containers.

Source

https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go


Generates a random name from the list of Docker adjectives and surnames.

Description

This function generates 'n' random names, each combining a single adjective from [docker_adjectives] and a surname from [docker_names].

Usage

make_docker_names(n, retry = FALSE, sep = "_")

Arguments

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_'.

Value

A random name formatted as "adjective_surname" (for example, "focused_turing").

Examples

make_docker_names(1)
make_docker_names(2, retry = TRUE)

Generates a random name from a list of common English words.

Description

This function generates 'n' random names, each a combination of 'n_words' words selected from [common_words].

Usage

make_english_names(
  n,
  n_words = 3,
  retry = FALSE,
  sep = "_",
  case = c("lower", "upper", "title")
)

Arguments

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.

Value

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.

Examples

make_english_names(1, n_words = 2)
make_english_names(2, retry = TRUE)

Create procedural names.

Description

Create procedural names.

Usage

make_names(corpus, n, n_words, retry, sep = "_", case)

Arguments

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.

Value

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.


Generates a random name from a list of common Spanish words.

Description

This function generates 'n' random names, each a combination of 'n_words' words selected from [spanish_words].

Usage

make_spanish_names(
  n,
  n_words = 3,
  retry = FALSE,
  sep = "_",
  case = c("lower", "upper", "title")
)

Arguments

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.

Value

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.

Examples

make_spanish_names(1, n_words = 2)
make_spanish_names(2, retry = TRUE)

820 of the most common words in the Spanish language

Description

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.

Usage

spanish_words

Format

A character vector with 820 elements, each representing a single word commonly used in the Spanish language.

Source

http://corpus.rae.es/lfrecuencias.html