random-words 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,118 @@
1
+ # Doctor Who (`who`) Dictionary Design
2
+
3
+ **Date:** 2026-10-29
4
+ **Status:** Approved for implementation planning
5
+ **Trigger:** `who` (also `doctorwho`, `tardis`)
6
+
7
+ ## Goal
8
+
9
+ Add a Doctor Who themed dictionary under `lib/random-words/words/who/`, focused on dialog and characters, discovered like every other source (no generator code changes). Medical `doctor` remains separate and unchanged.
10
+
11
+ ## Decisions
12
+
13
+ | Topic | Choice |
14
+ |-------|--------|
15
+ | Era | Mostly New Who (2005–present), light Classic sprinkle |
16
+ | Quote density | Medium — solid iconic set; bulk is themed vocabulary |
17
+ | Size | Large (~Walken / 2500+ lines total) |
18
+ | Character weight | Even spread across NuWho Doctors; Classic icons (Fourth Doctor, Sarah Jane, UNIT, etc.) get more of the sprinkle |
19
+ | Approach | Hybrid: names/phrases/clauses carry dialog & characters; nouns/verbs/adjectives supply franchise lexicon bulk |
20
+
21
+ ## Layout
22
+
23
+ New directory mirroring existing dictionaries:
24
+
25
+ ```
26
+ lib/random-words/words/who/
27
+ config.yml
28
+ adjectives.txt
29
+ adverbs.txt
30
+ articles-plural.txt
31
+ articles-singular.txt
32
+ clauses.txt
33
+ conjunctions-coordinating.txt
34
+ conjunctions-subordinate.txt
35
+ names.txt
36
+ nouns-plural.txt
37
+ nouns-singular.txt
38
+ numbers.yml
39
+ phrases.txt
40
+ prepositions.txt
41
+ terminators.txt
42
+ verbs-passive.txt
43
+ verbs-plural.txt
44
+ verbs-singular.txt
45
+ ```
46
+
47
+ ### config.yml
48
+
49
+ ```yaml
50
+ ---
51
+ name: who
52
+ description: Doctor Who (New Who-forward, Classic sprinkle)
53
+ triggers: [who, doctorwho, tardis]
54
+ ```
55
+
56
+ No changes to `generator.rb` or other Ruby sources; dictionaries are loaded by directory name / triggers.
57
+
58
+ ## Content design
59
+
60
+ ### names.txt (~80–120)
61
+
62
+ Sentence-friendly character labels:
63
+
64
+ - NuWho Doctors: Ninth through Fifteenth, The Doctor, War Doctor
65
+ - Companions across NuWho (Rose, Martha, Donna, Amy, Rory, Clara, Bill, Yaz, Dan, Ruby, and peers)
66
+ - Villains and monsters: Master / Missy, Daleks, Cybermen, Weeping Angels, Silence, and similar
67
+ - Classic sprinkle: Fourth Doctor, Sarah Jane, Brigadier, UNIT, K-9
68
+
69
+ Prefer names that work as subjects (`Rose Tyler`, `The Doctor`, `Donna Noble`) over actor names.
70
+
71
+ ### phrases.txt (~50–70)
72
+
73
+ Recognizable lines and catchphrases without becoming a quote dump. Mix Doctor catchphrases, companion beats, monster slogans, and a few Classic classics (e.g. jelly babies, Exterminate!).
74
+
75
+ ### clauses.txt (~180–250)
76
+
77
+ Show-voice fragments used as clause inserts: TARDIS arrivals, regenerations, Dalek/Cyberman threats, timey-wimey explanations, companion loyalty, UNIT briefings. First- and third-person mix (Walken-style), Who-flavored.
78
+
79
+ ### Lexicon bulk (Walken-scale)
80
+
81
+ | File | Target | Focus |
82
+ |------|--------|--------|
83
+ | nouns-singular | ~400–500 | TARDIS, sonic screwdriver, regeneration, Gallifrey, Skaro, vortex, paradox, Time Lord, species, tech, places |
84
+ | nouns-plural | ~300–400 | Matching plurals |
85
+ | verbs-singular / verbs-plural | ~250–300 each | regenerate, dematerialize, exterminate, travel, warn, convert, reverse… |
86
+ | verbs-passive | ~200–350 | was regenerated by, was converted by, was chased by… |
87
+ | adjectives | ~130–200 | timey-wimey, ancient, doomed, brilliant, impossible… |
88
+ | adverbs | ~130–200 | suddenly, brilliantly, bravely, paradoxically… |
89
+
90
+ Tone: adventurous, ominous, witty. Not medical vocabulary.
91
+
92
+ ### Structural files
93
+
94
+ Articles, coordinating/subordinate conjunctions, prepositions, terminators, and `numbers.yml` copied from `english` or `walken` with little or no Who flavor (same pattern as other themed dictionaries).
95
+
96
+ ### Size target
97
+
98
+ Roughly **2500+ lines** across all word files combined.
99
+
100
+ ## Out of scope
101
+
102
+ - Changes to sentence templates or generator logic
103
+ - Renaming or altering the medical `doctor` dictionary
104
+ - Torchwood / Sarah Jane Adventures as full separate dictionaries (individual characters may appear in `names` where familiar)
105
+ - Exhaustive quote catalogs or copyrighted script dumps beyond short iconic phrases
106
+
107
+ ## Verification
108
+
109
+ 1. `RandomWords::Generator.new(:who)` initializes without error
110
+ 2. Trigger aliases (`who`, `doctorwho`, `tardis`) resolve to this source
111
+ 3. Sample sentences/paragraphs feel Who-themed (characters, tech, dialog fragments appear)
112
+ 4. Line counts land near the targets above (especially names/phrases/clauses and noun/verb bulk)
113
+
114
+ ## Implementation notes
115
+
116
+ - Reuse structural lists from `english`/`walken` to avoid reinventing grammar glue
117
+ - Prefer franchise-common terms over obscure one-off episode props unless they are culturally iconic
118
+ - Keep singular/plural and singular/plural verb pairs consistent where both files exist
@@ -39,6 +39,7 @@ module RandomWords
39
39
  # @raise [RuntimeError] if no dictionary is found for the given language
40
40
  def initialize(lang)
41
41
  @lang = lang.to_s
42
+ @requested_lang = lang.to_s # Store the requested language
42
43
  FileUtils.mkdir_p(config_dir) unless File.directory?(config_dir)
43
44
 
44
45
  @source_dir = user_dictionary_exist? ? user_lang_dir : builtin_lang_dir
@@ -222,13 +223,19 @@ module RandomWords
222
223
  config_file = File.join(config_dir, 'config.yml')
223
224
  if File.exist?(config_file)
224
225
  config = YAML.load_file(config_file).symbolize_keys
225
- return handle_config(config)
226
+ config_hash = handle_config(config)
227
+ # Override with the language passed to initialize
228
+ config_hash[:source] = @requested_lang.to_sym if @requested_lang
229
+ return config_hash
226
230
  end
227
231
  # If the config file doesn't exist, create it
228
232
  # and return the default configuration
229
233
  create_base_config(config_file)
230
234
  config = YAML.load_file(config_file).symbolize_keys
231
- handle_config(config)
235
+ config_hash = handle_config(config)
236
+ # Override with the language passed to initialize
237
+ config_hash[:source] = @requested_lang.to_sym if @requested_lang
238
+ config_hash
232
239
  end
233
240
 
234
241
  # Look for a config.yml file in the config directory
@@ -1,4 +1,4 @@
1
1
  module RandomWords
2
2
  # The version of the RandomWords gem.
3
- VERSION = '1.0.18'
3
+ VERSION = '1.0.20'
4
4
  end
@@ -0,0 +1,199 @@
1
+ abandoned
2
+ alien
3
+ ancient
4
+ angry
5
+ arcane
6
+ armoured
7
+ astonishing
8
+ atomic
9
+ bewildering
10
+ bizarre
11
+ bold
12
+ brave
13
+ bright
14
+ brilliant
15
+ broken
16
+ brutal
17
+ cautious
18
+ celestial
19
+ chaotic
20
+ clever
21
+ cold
22
+ colossal
23
+ confused
24
+ corrupted
25
+ cosmic
26
+ crafty
27
+ crumbling
28
+ cryptic
29
+ curious
30
+ cybernetic
31
+ dangerous
32
+ dark
33
+ dazzling
34
+ deadly
35
+ defiant
36
+ desperate
37
+ destroyed
38
+ devious
39
+ dimensional
40
+ distant
41
+ doomed
42
+ dormant
43
+ dreadful
44
+ dusty
45
+ eccentric
46
+ eerie
47
+ electric
48
+ elusive
49
+ empty
50
+ endless
51
+ enormous
52
+ eternal
53
+ exiled
54
+ exploding
55
+ fantastic
56
+ fearless
57
+ ferocious
58
+ fierce
59
+ fiery
60
+ fixed
61
+ flickering
62
+ foolish
63
+ forbidden
64
+ forgotten
65
+ fractured
66
+ frantic
67
+ frozen
68
+ furious
69
+ future
70
+ galactic
71
+ gallifreyan
72
+ ghostly
73
+ gigantic
74
+ glittering
75
+ gloomy
76
+ golden
77
+ gorgeous
78
+ grim
79
+ haunted
80
+ heroic
81
+ hidden
82
+ hollow
83
+ hostile
84
+ humble
85
+ hungry
86
+ hypnotic
87
+ icy
88
+ immortal
89
+ impossible
90
+ incredible
91
+ infinite
92
+ insane
93
+ intergalactic
94
+ invisible
95
+ irresistible
96
+ last
97
+ lethal
98
+ lonely
99
+ lost
100
+ luminous
101
+ mad
102
+ magnificent
103
+ malevolent
104
+ massive
105
+ menacing
106
+ metallic
107
+ mighty
108
+ mischievous
109
+ monstrous
110
+ mysterious
111
+ nervous
112
+ noble
113
+ notorious
114
+ obsolete
115
+ ominous
116
+ orbital
117
+ ordinary
118
+ outlandish
119
+ paradoxical
120
+ peculiar
121
+ perilous
122
+ persistent
123
+ phantom
124
+ planetary
125
+ playful
126
+ poisonous
127
+ powerful
128
+ primitive
129
+ proud
130
+ puzzling
131
+ quantum
132
+ quiet
133
+ radiant
134
+ rampant
135
+ rebellious
136
+ reckless
137
+ relentless
138
+ remarkable
139
+ restless
140
+ reversed
141
+ rogue
142
+ ruined
143
+ rusty
144
+ sacred
145
+ savage
146
+ scarred
147
+ secret
148
+ sentient
149
+ shadowy
150
+ shattered
151
+ shimmering
152
+ silent
153
+ sinister
154
+ sleepless
155
+ slippery
156
+ solitary
157
+ sonic
158
+ spectacular
159
+ spooky
160
+ stalwart
161
+ stellar
162
+ stolen
163
+ strange
164
+ stubborn
165
+ sudden
166
+ supreme
167
+ suspicious
168
+ temporal
169
+ terrible
170
+ terrifying
171
+ thrilling
172
+ timeless
173
+ timey-wimey
174
+ tireless
175
+ tough
176
+ treacherous
177
+ tricky
178
+ trusty
179
+ twisted
180
+ unbreakable
181
+ undaunted
182
+ unearthly
183
+ unexpected
184
+ unknown
185
+ unstoppable
186
+ vanishing
187
+ vast
188
+ vengeful
189
+ vicious
190
+ vigilant
191
+ villainous
192
+ wandering
193
+ weary
194
+ weeping
195
+ wibbly-wobbly
196
+ wicked
197
+ wild
198
+ wise
199
+ wonderful
@@ -0,0 +1,175 @@
1
+ abruptly
2
+ adventurously
3
+ angrily
4
+ anxiously
5
+ awkwardly
6
+ bitterly
7
+ blindly
8
+ boldly
9
+ bravely
10
+ brightly
11
+ brilliantly
12
+ brutally
13
+ calmly
14
+ carefully
15
+ cautiously
16
+ chaotically
17
+ cheerfully
18
+ cleverly
19
+ coldly
20
+ confidently
21
+ cosmically
22
+ courageously
23
+ craftily
24
+ cruelly
25
+ curiously
26
+ cynically
27
+ dangerously
28
+ daringly
29
+ darkly
30
+ dauntlessly
31
+ deadly
32
+ defiantly
33
+ deliberately
34
+ desperately
35
+ determinedly
36
+ devilishly
37
+ diligently
38
+ dramatically
39
+ dreadfully
40
+ eagerly
41
+ eerily
42
+ elegantly
43
+ endlessly
44
+ eternally
45
+ excitedly
46
+ fearlessly
47
+ ferociously
48
+ fiercely
49
+ foolishly
50
+ forever
51
+ fortunately
52
+ frantically
53
+ furiously
54
+ gallantly
55
+ gently
56
+ gleefully
57
+ gloomily
58
+ gracefully
59
+ gravely
60
+ grimly
61
+ happily
62
+ hastily
63
+ heroically
64
+ hopefully
65
+ hopelessly
66
+ hurriedly
67
+ hysterically
68
+ ignorantly
69
+ immediately
70
+ impatiently
71
+ impossibly
72
+ incessantly
73
+ incredibly
74
+ innocently
75
+ instantly
76
+ intensely
77
+ irresistibly
78
+ jauntily
79
+ joyfully
80
+ keenly
81
+ kindly
82
+ lazily
83
+ loudly
84
+ loyally
85
+ madly
86
+ magnificently
87
+ mercilessly
88
+ mischievously
89
+ mysteriously
90
+ nervously
91
+ nimbly
92
+ nobly
93
+ obstinately
94
+ oddly
95
+ ominously
96
+ openly
97
+ paradoxically
98
+ patiently
99
+ perilously
100
+ playfully
101
+ politely
102
+ powerfully
103
+ promptly
104
+ proudly
105
+ quickly
106
+ quietly
107
+ rapidly
108
+ rashly
109
+ recklessly
110
+ relentlessly
111
+ reluctantly
112
+ remarkably
113
+ repeatedly
114
+ resolutely
115
+ restlessly
116
+ ridiculously
117
+ rudely
118
+ ruthlessly
119
+ sadly
120
+ safely
121
+ savagely
122
+ secretly
123
+ selflessly
124
+ sensibly
125
+ shamelessly
126
+ sharply
127
+ shrewdly
128
+ silently
129
+ sleepily
130
+ slowly
131
+ smartly
132
+ smoothly
133
+ softly
134
+ solemnly
135
+ solidly
136
+ spectacularly
137
+ speedily
138
+ splendidly
139
+ steadily
140
+ stealthily
141
+ strangely
142
+ stubbornly
143
+ suddenly
144
+ suspiciously
145
+ swiftly
146
+ tenderly
147
+ terribly
148
+ theatrically
149
+ thoroughly
150
+ thoughtfully
151
+ tirelessly
152
+ tragically
153
+ treacherously
154
+ triumphantly
155
+ truly
156
+ uncannily
157
+ unexpectedly
158
+ unfortunately
159
+ unwisely
160
+ urgently
161
+ vaguely
162
+ valiantly
163
+ vengefully
164
+ viciously
165
+ vigilantly
166
+ violently
167
+ warily
168
+ wearily
169
+ wickedly
170
+ wildly
171
+ wisely
172
+ wistfully
173
+ wonderfully
174
+ worriedly
175
+ zealously
@@ -0,0 +1,10 @@
1
+ all
2
+ either
3
+ few
4
+ many
5
+ several
6
+ some
7
+ these
8
+ those
9
+ three
10
+ two
@@ -0,0 +1,8 @@
1
+ the
2
+ each
3
+ every
4
+ neither
5
+ any
6
+ one
7
+ this
8
+ that