randino library

randino generates random person names, nicknames, words, sentences, locations, ages, genders and organizations in the language you ask for.

The generators are kept apart on purpose. Person names read like names people actually carry (김민준, Emma Clover) and come with their English pronunciation. Nicknames are the handles someone would pick for a game or a website (멋진사자, MistyOwl); they are built from everyday words and never from person names. Words are those everyday words on their own, sentences are whole statements written in the language's own grammar, and locations are real places, from the country down to a Korean 읍·면·동 or a US city. Ages are whole numbers drawn along a curve shaped like a population, genders are the labels a form in the language writes, and organizations are companies, schools and offices that do not exist.

import 'package:randino/randino.dart';

randName(language: NameLanguage.ko, count: 3); // ['김태윤', '원동혁', '조진우']
randNickname(language: WordLanguage.en); // ['MistyOwl']
randSentence(language: WordLanguage.en); // ['The brave lion runs quietly.']

Every parameter is optional and named, and a null enum means "every one of them" — randName() with nothing passed returns one name in one of the nine supported languages.

Classes

AgeDetail
A generated age with the part of a life it falls in.
CountryDetail
A generated country with the code it is known by.
GenderDetail
A generated gender in its language, with the code behind it.
LengthRange
A span of lengths in characters, inclusive at both ends.
LocationDetail
A generated location with every level it was built from.
NameDetail
A generated name in both scripts, with the choices that produced it.
NicknameDetail
A generated nickname with the pieces it was built from.
OrganizationDetail
A generated organization with the pieces it was built from.
SentenceDetail
A generated sentence with the pieces it was built from.
WordDetail
A generated word with where it came from.

Enums

AgeDistribution
How likely each age is.
AgeGroup
Which part of a life an age falls in.
GenderCode
A gender as a code, the same in every language.
LocationLanguage
A language the location generators can write in.
LocationLevel
How far down a location goes, largest first.
ModifierKind
The two slots that can modify a noun, which is what randModifier draws.
NameGender
Which pools a given name is drawn from.
NameLanguage
A language the name generator can produce names in.
NameScript
How a name is written out.
OrganizationIndustry
What a company does, which is the word its name carries for it.
OrganizationType
What kind of organization a name is for.
RandRealism
How close to the real language a result stays.
RandVocabulary
How common the words a result is built from have to be.
SentenceQuote
Which pair of quotation marks a quoted line takes.
SentenceShape
How much a sentence says, which is the closest thing it has to an expected length.
SentenceSlot
What one phrase does in a sentence.
SentenceStory
The story a result of several sentences follows.
SentenceStyle
How a sentence addresses whoever is reading it.
SentenceTense
When a sentence happened.
SentenceType
What a sentence is doing, which decides what it closes on and — where the grammar needs it — the shape it takes.
WordLanguage
A language the word pools cover.
WordSlot
What one word does inside a nickname.
WordTheme
What a word is about.

Constants

affixCharset → const String
Affix characters, minus the pairs that are easy to misread (0/O, 1/l/I) — these end up in names people read aloud and type back in.
affixLengthDefault → const int
Characters in an affix when no length is asked for.
affixLengthMax → const int
Upper bound for the affix length.
affixSeparatorDefault → const String
Placed between the value and its affix when no separator is asked for.
randAgeMax → const int
Upper bound for minAge / maxAge on randAge, in years.
randCountMax → const int
Upper bound for count on every generator.
randLengthMax → const int
Upper bound for minLength / maxLength on every generator, in characters.
randLengthMin → const int
Lower bound for minLength / maxLength on every generator, in characters.
randLocationLengthMax → const int
Upper bound for minLength / maxLength on the location generators, in characters.
randOrganizationLengthMax → const int
Upper bound for minLength / maxLength on randOrganization, in characters.
randSentenceCountMax → const int
Upper bound for sentences on randSentence — how many sentences one result string may hold.
randSentenceLengthMax → const int
Upper bound for minLength / maxLength on randSentence, per sentence, in characters.

Properties

ageGroups → List<AgeGroup>
The groups an age can fall in, youngest first.
final
locationLanguages → List<LocationLanguage>
Languages the location generators cover, and so the countries: a language writes the places of its own.
final
locationLevels → List<LocationLevel>
How far down a location can go, largest first.
final
nameLanguages → List<NameLanguage>
Every language the name generator knows about. Leaving language out draws from this list, so the order only matters for presentation.
final
organizationIndustries → List<OrganizationIndustry>
What a company can do, which is the word its name carries for it.
final
organizationTypes → List<OrganizationType>
The kinds of organization, a business first and the institutions after it.
final
wordLanguages → List<WordLanguage>
Languages the word pools cover — the same nine the name generator knows.
final
wordThemes → List<WordTheme>
What the words can be about. Person names are deliberately absent.
final

Functions

nameLengthRange({NameLanguage? language, bool includeSurname = true, bool includeMiddleName = false}) → LengthRange
Natural length range of a full name in the given language, in characters of the native form.
nameSupportsMiddleName([NameLanguage? language]) → bool
Whether the language uses a middle name.
nameSupportsRoman([NameLanguage? language]) → bool
Whether NameScript.roman produces anything different from NameScript.native.
nicknameLengthRange({WordLanguage? language, String? wordSeparator}) → LengthRange
Every nickname length the language can produce, in characters, which is what randNickname falls back to when minLength or maxLength is omitted.
randAge({int count = 1, int? minAge, int? maxAge, Set<AgeGroup>? group, AgeDistribution distribution = AgeDistribution.population, bool unique = false, Random? random}) → List<int>
Generate ages for sample people, in whole years.
randAgeDetails({int count = 1, int? minAge, int? maxAge, Set<AgeGroup>? group, AgeDistribution distribution = AgeDistribution.population, bool unique = false, Random? random}) → List<AgeDetail>
randAge, along with the part of a life each age falls in.
randAnimal({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Animals — the creatures a nickname is most often built around.
randBody({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
The parts of a body, inside and out.
randCity({LocationLanguage? language, int count = 1, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Generate the divisions a region is made of: a Korean 시·군·구, written with its city where it is one of a city's districts (수원시 장안구), or a US city, town, village or census designated place.
randCityDetails({LocationLanguage? language, int count = 1, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<LocationDetail>
randCity, reporting the region and country each city is in.
randClothing({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
What people wear, and what it is made of.
randColor({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Colours, from the plain ones to the ones with a history.
randConcept({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Ideas out of the humanities and the social world.
randCountry({WordLanguage? language, int count = 1, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Generate country names: every ISO 3166-1 country and territory, 249 of them, named the way the language names it.
randCountryDetails({WordLanguage? language, int count = 1, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<CountryDetail>
randCountry, along with the ISO 3166-1 code each country is known by.
randDistrict({LocationLanguage? language, int count = 1, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Generate the divisions inside a city: a Korean 읍·면·동.
randDistrictDetails({LocationLanguage? language, int count = 1, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<LocationDetail>
randDistrict, reporting the city, region and country each district is in.
randDrink({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Something to drink, hot, cold or fermented.
randEmotion({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
What someone feels, from joy to a quiet regret.
randFinance({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Money, and the words for what is done with it.
randFood({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Food and drink, the everyday kind.
randFurniture({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Furniture and the furnishings of a home.
randGem({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Stones and metals, precious and ordinary alike.
randGender({WordLanguage? language, int count = 1, bool includeUnknown = false, bool includeNonbinary = false, bool unique = false, Random? random}) → List<String>
Generate genders for sample people, written the way a form in the language labels them.
randGenderDetails({WordLanguage? language, int count = 1, bool includeUnknown = false, bool includeNonbinary = false, bool unique = false, Random? random}) → List<GenderDetail>
randGender, along with the code behind each label, so the code can be stored while the label is shown.
randJob({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
The trades and roles people hold. Never a person name — which is why there is no Baker or Hunter here.
randLocation({LocationLanguage? language, LocationLevel level = LocationLevel.district, int count = 1, int? minLength, int? maxLength, String? startsWith, bool unique = false, bool includeCountry = true, Random? random}) → List<String>
Generate real locations, written out from the country down to level the way the language writes one.
randLocationDetails({LocationLanguage? language, LocationLevel level = LocationLevel.district, int count = 1, int? minLength, int? maxLength, String? startsWith, bool unique = false, bool includeCountry = true, Random? random}) → List<LocationDetail>
randLocation, reporting every level each location names.
randModifier({String? value, WordLanguage? language, RandRealism realism = RandRealism.real, ModifierKind? kind, String? separator, Random? random}) → String
Puts a random modifier in front of value: '사자' becomes '멋진사자'.
randModifierAll(List<String> values, {WordLanguage? language, RandRealism realism = RandRealism.real, ModifierKind? kind, String? separator, Random? random}) → List<String>
randModifier over a list — a fresh modifier for each entry, not one for the batch.
randMusic({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Music: instruments, forms and the words around them.
randMyth({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Creatures and figures out of myth and folklore.
randName({NameLanguage? language, NameGender? gender, int count = 1, RandRealism realism = RandRealism.real, int? minLength, int? maxLength, bool includeSurname = true, bool includeMiddleName = false, NameScript script = NameScript.native, String? startsWith, bool unique = false, Random? random}) → List<String>
Generate natural-looking person names.
randNameDetails({NameLanguage? language, NameGender? gender, int count = 1, RandRealism realism = RandRealism.real, int? minLength, int? maxLength, bool includeSurname = true, bool includeMiddleName = false, String? startsWith, bool unique = false, Random? random}) → List<NameDetail>
Generate person names with both scripts and the choices behind each one.
randNature({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Nature and its phenomena — sky, weather, water, land.
randNickname({WordLanguage? language, WordTheme? theme, Set<WordSlot>? slots, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? wordSeparator, String? startsWith, bool unique = false, Random? random}) → List<String>
Generate nicknames — the kind of handle someone would pick for a game or a website.
randNicknameDetails({WordLanguage? language, WordTheme? theme, Set<WordSlot>? slots, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? wordSeparator, String? startsWith, bool unique = false, Random? random}) → List<NicknameDetail>
Generate nicknames along with the pieces each one was built from.
randObject({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Everyday things: what is on a desk, in a bag, around a house.
randOrganization({WordLanguage? language, Set<OrganizationType>? type, OrganizationIndustry? industry, bool? includeLegalForm, int count = 1, RandRealism realism = RandRealism.real, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Generate the names of organizations that do not exist: companies, schools, government offices, public institutions and associations, written the way the language writes each of them.
randOrganizationDetails({WordLanguage? language, Set<OrganizationType>? type, OrganizationIndustry? industry, bool? includeLegalForm, int count = 1, RandRealism realism = RandRealism.real, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<OrganizationDetail>
randOrganization, along with the pieces each name was built from: the name with and without its legal form, the form itself, its kind and its industry.
randPerson({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
People by age, kinship and character, never by trade and never by name.
randPlace({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Places — where people gather, live and pass through.
randPlant({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Plants: trees, flowers, leaves and what grows on them.
randPrefix({String? value, int length = affixLengthDefault, String separator = affixSeparatorDefault, String? charset, Random? random}) → String
Prepends a random token to value. The mirror of randSuffix, for the places where the distinguishing part belongs in front — a shard, a tenant, a key that is sortable by nothing. It is the same token, so it is not for anything that has to be unguessable either; see randSuffix.
randPrefixAll(List<String> values, {int length = affixLengthDefault, String separator = affixSeparatorDefault, String? charset, Random? random}) → List<String>
randPrefix over a list — a fresh token for each entry, not one for the batch. See randSuffixAll for why the list form is its own function.
randProduct({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Things you buy — the manufactured end of the vocabulary.
randRegion({LocationLanguage? language, int count = 1, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Generate a country's first-level divisions: a Korean 시·도, a US state or the District of Columbia.
randRegionDetails({LocationLanguage? language, int count = 1, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<LocationDetail>
randRegion, reporting the country each region is in.
randSentence({WordLanguage? language, WordTheme? theme, SentenceShape? shape, Set<SentenceSlot>? slots, List<String> include = const <String>[], int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.common, int? minLength, int? maxLength, String? startsWith, bool unique = false, int sentences = 1, bool? includeName, Set<SentenceType>? type, SentenceQuote? quote, SentenceStyle? style, SentenceTense? tense, SentenceStory? story, Random? random}) → List<String>
Generate whole sentences — a subject and something said about it, written the way the language writes it.
randSentenceDetails({WordLanguage? language, WordTheme? theme, SentenceShape? shape, Set<SentenceSlot>? slots, List<String> include = const <String>[], int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.common, int? minLength, int? maxLength, String? startsWith, bool unique = false, int sentences = 1, bool? includeName, Set<SentenceType>? type, SentenceQuote? quote, SentenceStyle? style, SentenceTense? tense, SentenceStory? story, Random? random}) → List<SentenceDetail>
Generate sentences along with the pieces each one was built from.
randSound({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Sounds and voices, and the words a language has for them.
randSpace({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
What is beyond the sky, from the moon to a galaxy.
randSport({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Sports and the things people play.
randSuffix({String? value, int length = affixLengthDefault, String separator = affixSeparatorDefault, String? charset, Random? random}) → String
Appends a random token to value, so that two people asking for the same nickname at the same moment are very unlikely to walk away with the same one.
randSuffixAll(List<String> values, {int length = affixLengthDefault, String separator = affixSeparatorDefault, String? charset, Random? random}) → List<String>
randSuffix over a list — a fresh token for each entry rather than one for the batch, which is what a generator's output is usually passed here for.
randTech({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
The vocabulary of computers and the networks between them.
randTime({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
When something happens, from a moment to a season.
randTool({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
What a hand works with, from a chisel to a plough.
randToy({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Toys and games, the things and the play a childhood is made of.
randVehicle({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Things that carry you.
randWeather({WordLanguage? language, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
What the sky is doing, from a breeze to a blizzard.
randWord({WordLanguage? language, WordTheme? theme, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<String>
Generate everyday words — the vocabulary a nickname is built from, on its own.
randWordDetails({WordLanguage? language, WordTheme? theme, int count = 1, RandRealism realism = RandRealism.real, RandVocabulary vocabulary = RandVocabulary.full, int? minLength, int? maxLength, String? startsWith, bool unique = false, Random? random}) → List<WordDetail>
randWord, reporting the language and theme behind each word.
sentenceLengthRange([WordLanguage? language]) → LengthRange
Every sentence length the language can produce, in characters, which is what randSentence falls back to when minLength or maxLength is omitted.
wordLengthRange({WordLanguage? language, WordTheme? theme}) → LengthRange
Shortest and longest word the language's pools hold, in characters.