https://github.com/kohsuke/wordnet-random-name
Human friendly random name generator for tests
https://github.com/kohsuke/wordnet-random-name
Last synced: 17 days ago
JSON representation
Human friendly random name generator for tests
- Host: GitHub
- URL: https://github.com/kohsuke/wordnet-random-name
- Owner: kohsuke
- License: other
- Created: 2014-04-07T00:04:29.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-06-24T14:56:02.000Z (10 months ago)
- Last Synced: 2025-03-28T09:04:10.805Z (24 days ago)
- Language: Java
- Size: 162 KB
- Stars: 133
- Watchers: 3
- Forks: 35
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-java - Wordnet Random Name
README
# Human-friendly Random Name Generator
This little library generates human friendly random identifiers. For example, given the following
code,RandomNameGenerator rnd = new RandomNameGenerator(0);
for (int i=0; i<10; i++)
System.out.println(rnd.next());The output will be as follows:
constructive_carrot
flexible_designer
linear_fund
popular_leaf
steady_parent
abstract_rest
controversial_supply
fragrant_absorption
lively_cassette
powerful_destructionIn testing, these names are more useful than number-based random names, as they are more memorable to
humans.The generator is based on a fixed dictionary of about 600 adjectives and 2400 nouns, thereby
producing little more than 1.5 million unique combinations. If you keep calling the `next()`
method beyond this limit, it'll start producing the same name again.The generator is pseudo-random, meaning if you provide the same seed value, it'll always
generate the same sequence of identifiers.