In the previous post we constructed a mnemonic phrase using parts of speech and simple grammars, but the generated phrases used a lot of abstract and esoteric words. To make phrases more concrete, we can use a smaller list of words, such as this one on Wikipedia:
(def nouns
'[hose hat hen home arrow whale shoe cow hoof pie
sauce seed sun sumo sierra soil sewage sky sofa soap
daisy tattoo tuna dome diary tail dish dog dove tuba
nose net onion enemy winery nail nacho neck knife honeybee
mouse meadow moon mummy emery mole match mug movie map
rice road urine rum aurora railway roach rag roof rope
louse lady lion lime lorry lily leech leg lava lip
cheese cheetah chin gem shrew chilli cha-cha chick chef jeep
goose cat coin game crow clay cage cake cave cube
vase video fan fairy fool veggie fig fife vibe
boss bead pony puma berry bell pouch bike beef pipe])
We can define verbs
and adjectives
similarly.
Some of the words in Wikipedia's list aren't in the CMU pronunciation dictionary, so we'll define their encodings manually:
(def manual-encodings
{"shrew" "64"
"chilli" "65"
"cha-cha" "66"
"swishy" "06"
"sappy" "09"
"nudgy" "26"
"naggy" "27"
"haram" "43"})
Now we can assemble our dictionary:
(defn encode-as [part-of-speech]
(fn [word]
(let [word (name word)]
[part-of-speech
(or (major-phoneme-encode word)
(manual-encodings word))
word])))
(def dictionary
(reverse (concat
(map (encode-as :noun) nouns)
(map (encode-as :verb) verbs)
(map (encode-as :adjective) adjectives))))
I've reversed the list so generate-mnemonic
prefers words for double digits.
Let's see what using this smaller vocabulary generates for the grammatical pattern [:noun :verb :noun]
:
Digits | Matches | Sample |
---|---|---|
1414 | 3 | hat row diary, hat read arrow, diary hate arrow |
1732 | 3 | hat hook moon, hat comb hen, dog aim hen |
2236 | 3 | hen know match, hen name shoe, onion aim shoe |
2646 | 3 | hen chew roach, hen jury shoe, nacho row shoe |
3183 | 2 | meadow view home, home defy home |
31830 | 3 | home defy mouse, meadow view mouse, meadow fume hose |
There are fewer matches generated for each sequence, but there are lots more memorable images. Given some imagination and personification, only a few phrases are hard to conjure a mental picture for.
To create additional matches, we can try other grammatical patterns, such as [:adjective :noun]
:
Digits | Matches | Sample |
---|---|---|
1414 | 1 | dry diary |
1732 | 1 | thick moon |
2236 | 1 | neon match |
2646 | 1 | nudgy roach |
3183 | 0 | |
31830 | 0 |
or [:adjective :noun :verb]
:
Digits | Matches | Sample |
---|---|---|
1414 | 3 | hot arrow draw, hot road row, dry hat row |
1732 | 3 | hot cow mine, hot game know, thick home know |
2236 | 3 | new hen mash, new enemy chew, neon home chew |
2646 | 3 | new shoe reach, new shrew chew, nudgy arrow chew |
3183 | 3 | yummy hat fume, yummy dove aim, mute hoof aim |
31830 | 2 | mute hoof amuse, yummy dove amuse |
Longer sequences of digits require longer grammar patterns. You can guess at the necessary pattern length given that a single word only encodes one or two digits. To encode the first ten digits of the golden ratio (1.618033988), we need at least five parts of speech:
Pattern | Matches | Sample |
---|---|---|
[:adjective :noun :verb :adjective :noun] | 1 | whitish dove assume wimpy fife |
[:adjective :adjective :noun :verb :noun] | 1 | whitish deaf sumo mop fife |
[:adjective :adjective :noun :verb :adjective :noun] | 15 | whitish hot vase mime happy fife, whitish hot hoof assume wimpy fife, whitish deaf hose mime happy fife, whitish deaf sumo aim puffy hoof, whitish deaf hose aim wimpy fife |
While outlandish imagery is a helpful mnemonic, the longer the phrase the more strained the image becomes. It can be difficult to generate something outlandish but memorable without crossing the line into forgettable nonsense, turning a sequence of random digits into merely a sequence of random words.