Themes
A theme is a slice of everyday vocabulary that a modifier can sit in front of. There are twenty-nine of them, every language fills every one, and a word belongs to exactly one, which is what makes the theme a word reports unambiguous.
Each theme is also a generator of its own. randWord takes the theme as an option; the twenty-nine functions in the third column are the same generator with the theme already chosen, and randNickname builds on the same pools.
| Theme | Function | What it holds | Korean | English |
|---|---|---|---|---|
animal | randAnimal | animals | 사자, 고양이 | Lion, Cat |
object | randObject | things within reach | 물병, 우산 | Bottle, Umbrella |
nature | randNature | nature and its phenomena | 하늘, 노을 | Sky, Dawn |
plant | randPlant | plants, and their parts | 민들레, 솔방울 | Dandelion, Acorn |
gem | randGem | stones, metals and gems | 흑요석, 청동 | Obsidian, Bronze |
concept | randConcept | terms, and ideas from the humanities | 철학, 자유 | Philosophy, Truth |
myth | randMyth | creatures and things out of myth | 구미호, 불사조 | Phoenix, Rune |
job | randJob | the trades and roles people hold | 대장장이, 항해사 | Blacksmith, Archer |
music | randMusic | instruments, forms and terms | 교향곡, 거문고 | Cello, Sonata |
place | randPlace | places you can walk into or up to | 광장, 골목 | Lighthouse, Plaza |
food | randFood | things to eat | 떡볶이, 김밥 | Dumpling, Pancake |
sport | randSport | sports, and what they are played for | 양궁, 트로피 | Archery, Trophy |
vehicle | randVehicle | things that carry you | 열기구, 전차 | Airship, Tramcar |
product | randProduct | things you buy | 이어폰, 냉장고 | Earbuds, Toaster |
color | randColor | colours, plain and storied | 주홍, 쪽빛 | Crimson, Ocher |
finance | randFinance | money, and what is done with it | 이자, 환율 | Ledger, Yield |
tech | randTech | computers, and the networks between them | 서버, 캐시 | Server, Subnet |
weather | randWeather | what the sky is doing | 소나기, 무지개 | Drizzle, Gale |
space | randSpace | what is beyond the sky | 은하, 혜성 | Galaxy, Nebula |
time | randTime | when something happens | 새벽, 한여름 | Twilight, Epoch |
emotion | randEmotion | what someone feels | 그리움, 설렘 | Longing, Relief |
body | randBody | the parts of a body | 손목, 심장 | Wrist, Sinew |
clothing | randClothing | what people wear | 두루마기, 양말 | Cardigan, Linen |
tool | randTool | what a hand works with | 대패, 곡괭이 | Chisel, Trowel |
drink | randDrink | something to drink | 식혜, 보리차 | Cider, Cordial |
toy | randToy | toys and games | 팽이, 연 | Kite, Yoyo |
sound | randSound | sounds, voices and onomatopoeia | 속삭임, 함성 | Whisper, Chime |
person | randPerson | people by age, kinship and character | 꼬마, 이웃 | Toddler, Neighbor |
furniture | randFurniture | furniture and furnishings | 흔들의자, 요람 | Hammock, Cradle |
import { WORD_THEMES, randFood, randWord } from 'randino';
WORD_THEMES;
// ['animal', 'object', 'nature', 'plant', 'gem', 'concept', 'myth', 'job',
// 'music', 'place', 'food', 'sport', 'vehicle', 'product', 'color', 'finance',
// 'tech', 'weather', 'space', 'time', 'emotion', 'body', 'clothing', 'tool',
// 'drink', 'toy', 'sound', 'person', 'furniture']
randWord({ theme: 'food', language: 'en', count: 3 });
// ['Dumpling', 'Cocoa', 'Pancake']
randFood({ language: 'en', count: 3 }); // the same thingimport 'package:randino/randino.dart';
wordThemes; // every WordTheme, in presentation order
randWord(theme: WordTheme.food, language: WordLanguage.en, count: 3);
// [Dumpling, Cocoa, Pancake]
randFood(language: WordLanguage.en, count: 3); // the same thingfrom randino import WORD_THEMES, rand_food, rand_word
WORD_THEMES
# ('animal', 'object', 'nature', 'plant', 'gem', 'concept', 'myth', 'job',
# 'music', 'place', 'food', 'sport', 'vehicle', 'product', 'color', 'finance',
# 'tech', 'weather', 'space', 'time', 'emotion', 'body', 'clothing', 'tool',
# 'drink', 'toy', 'sound', 'person', 'furniture')
rand_word(theme="food", language="en", count=3)
# ['Dumpling', 'Cocoa', 'Pancake']
rand_food(language="en", count=3) # the same thingLeave the theme out and each result draws from one theme picked at random, so a batch spreads across all twenty-nine.
randNickname is the exception: at the default realism it spans twenty-six of them, leaving out color, finance and tech, because a word in front of a colour or a loan reads as a joke rather than a handle. Loosening realism puts them back, and naming one of them works at any realism. See How a nickname behaves.
The rules a theme follows
Themes are disjoint. A word in two of them would make the reported theme ambiguous, and would make the detail output name a theme the caller never asked about. When a new theme claims a word an older one already held, the word moves rather than being copied: place took the twelve places that were sitting in concept, vehicle took the bicycle and the train out of object, plant took the flowers and the trees out of nature, music took the instruments out of object, toy took the tops and the dice out of it, and furniture took the wardrobe and the bookshelf out of product. Where the two senses are genuinely different words, the word is renamed instead: the English toy became Marbles so that gem could keep Marble.
No person names, and no word that is only a name. For English this is enforced against the person-name pools automatically, which is why job has no Knight, Baker or Hunter and plant no Rose or Ivy. Korean and Japanese cannot be held to the same check, because 하늘, 별 and 森 are everyday nouns that happen also to be names. A modifier in front of one is still nobody's name.
Pool sizes are uneven on purpose. Most themes hold a hundred or more nouns per language, and the thinnest sit in the sixties. Some of these slices of vocabulary hold fewer words to begin with, and padding a pool with near-synonyms reads worse than a shorter pool.
The theme a word reports
| Where the word came from | What theme reports |
|---|---|
| Drawn from a theme | That theme |
Invented at realism: 'invented' | Null — unless it happens to spell a real word |
That last row is a real coincidence rather than a bug: the syllable templates spell Snake now and then, so an invented word can come back with theme set to animal.
See also
randWord— the generator the theme belongs to, and the twenty-nine functions beside it.randNickname— the same pools, put together.- Constants — the theme list at runtime.