MyNixOS website logo
Description

Several Methods for Procedural Name Generation.

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.

proceduralnames

Would a rose by any procedurally generated name still smell as sweet?

Lifecycle:maturing License: Apache2.0 CRANstatus codecov Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. R buildstatus

The goal of proceduralnames is to make it easy to quickly generate unique-enough identifier strings for easy differentiation of objects or observations.

Installation

If the CRAN badge above is green, you can install the released version of proceduralnames from CRAN with:

install.packages("proceduralnames")

You can always install the development version of proceduralnames from GitHub via:

remotes::install.github("mikemahoney218/proceduralnames")

Usage

At the moment, proceduralnames provides three user-facing functions: make_docker_names, make_english_names, and make_spanish_names. make_docker_names makes names in the same way Docker generates names for its containers:

library(proceduralnames)
make_docker_names(1)
#> [1] "optimistic_shirley"

make_english_names and make_spanish_names both generate names using a subset of the 1,000 most common words in English or Spanish, respectively:

make_english_names(1)
#> [1] "night_solve_noise"
make_spanish_names(1)
#> [1] "grandes_silencio_programa"

All three functions can be used to generate multiple names by providing a different number to the n argument. make_english_names and make_spanish_names both have an argument, n_words, which can be used to alter the number of words combined for each name. All three functions also have an argument, retry (named after the argument used in generating Docker container names) which will append a random integer between 1 and 10 to the end of each name:

make_docker_names(1, retry = TRUE)
#> [1] "confident_mclean9"

In addition to these functions, proceduralnames provides the data sets each function draws from (namely, docker_adjectives, docker_names, common_words, and spanish_words). These data may evolve with each release of the package, so try not to depend on the length and contents of each vector remaining constant, but the fundamental shape of each object will remain stable.

Note that the emphasis of this package is on generating human-readable identifiers, not necessarily universally unique strings. If you need strings which are functionally universally unique for your application, look into the uuid package.

Metadata

Version

0.2.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows