Generating questions for memorizing texts

24 views
Skip to first unread message

Gwern Branwen

unread,
Sep 7, 2008, 3:12:21 PM9/7/08
to mnemosyne-...@googlegroups.com
[Re-sending. Apparently my email didn't make it into the SourceForce list.]

Hi everyone. So I just recently started using Mnemosyne, and thus far
it's been quite interesting (and I am generally happy with the overall
quality and polish).

Up until now, I had just been plugging in the occasional vocab from
A-Word-A-Day and random words I've run into which I didn't know, and
miscellany. But I recently decided that since I like Edward
Fitzgerald's _The Rubaiyat of Omar Khayyam_ so much, I ought to get
around to memorizing it.

Memorizing a couple dozen rhyming rubaiyat didn't look to be all that
difficult, and the rhyme structure means that there's even an obvious
way to structure it as a question/answer: remove two non-rhyming
lines. That is:

Q:

Awake! for Morning in the Bowl of Night
_______________________________________
_______________________________________
The Sultan's Turret in a Noose of Light.

A:

Awake! for Morning in the Bowl of Night
Has flung the Stone that puts the Stars to Flight:
And Lo! the Hunter of the East has caught
The Sultan's Turret in a Noose of Light.

I decided to take it further, and question on all 4 possibilities (to
prevent myself from being in a situation where, if you give me the
last two lines, I have no trouble remembering the whole, but I
couldn't come up with the whole unaided for love or money.)

But I can't seem to find any tools or scripts for autogenerating these
sorts of questions. It seems to me that "take this text and generate a
bunch of question/answers by removing various sections" would useful
to more than just me.

Has anyone come up with anything?

----

I couldn't find anything, so I wrote myself a Haskell script to take
the Rubaiyat text and generate the 4 questions in the tab-based format
Mnemosyne understands. You can find the script, the input, and the
output attached. But as I say, it's a quick and dirty script. I think
it works on the general case, but I'm not sure. The program is Public
Domain, and written in the Haskell functional programming language -
which made the core permutation algorithm very easy to get correct.
Anyway, it can be run compiled or interpreted. It's unixy inasmuch as
it works via stdin/stdout; and it should be portable (I am reasonably
sure it'll work under just about all the major Haskell
implementations).

Example output:

gwern@craft:13885~/bin/haskell/split>cat ~/rubaiyat.txt [11:48AM]
Awake! for Morning in the Bowl of Night
Has flung the Stone that puts the Stars to Flight:
And Lo! the Hunter of the East has caught
The Sultan's Turret in a Noose of Light.

Dreaming when Dawn's Left Hand was in the Sky
I heard a Voice within the Tavern cry,
"Awake, my Little ones, and fill the Cup
Before Life's Liquor in its Cup be dry."

gwern@craft:13886~/bin/haskell/split>cat ~/rubaiyat.txt | runhaskell
memo.hs [11:48AM]
_______________________________________<br>__________________________________________________<br>And
Lo! the Hunter of the East has caught<br>The Sultan's Turret in a
Noose of Light. Awake! for Morning in the Bowl of Night<br>Has flung
the Stone that puts the Stars to Flight:<br>And Lo! the Hunter of the
East has caught<br>The Sultan's Turret in a Noose of Light.
_______________________________________<br>Has flung the Stone that
puts the Stars to
Flight:<br>_________________________________________<br>The Sultan's
Turret in a Noose of Light. Awake! for Morning in the Bowl of
Night<br>Has flung the Stone that puts the Stars to Flight:<br>And Lo!
the Hunter of the East has caught<br>The Sultan's Turret in a Noose of
Light.
_______________________________________<br>Has flung the Stone that
puts the Stars to Flight:<br>And Lo! the Hunter of the East has
caught<br>________________________________________ Awake! for Morning
in the Bowl of Night<br>Has flung the Stone that puts the Stars to
Flight:<br>And Lo! the Hunter of the East has caught<br>The Sultan's
Turret in a Noose of Light.
Awake! for Morning in the Bowl of
Night<br>__________________________________________________<br>_________________________________________<br>The
Sultan's Turret in a Noose of Light. Awake! for Morning in the Bowl
of Night<br>Has flung the Stone that puts the Stars to Flight:<br>And
Lo! the Hunter of the East has caught<br>The Sultan's Turret in a
Noose of Light.
Awake! for Morning in the Bowl of
Night<br>__________________________________________________<br>And Lo!
the Hunter of the East has
caught<br>________________________________________ Awake! for Morning
in the Bowl of Night<br>Has flung the Stone that puts the Stars to
Flight:<br>And Lo! the Hunter of the East has caught<br>The Sultan's
Turret in a Noose of Light.
Awake! for Morning in the Bowl of Night<br>Has flung the Stone that
puts the Stars to
Flight:<br>_________________________________________<br>________________________________________
Awake! for Morning in the Bowl of Night<br>Has flung the Stone that
puts the Stars to Flight:<br>And Lo! the Hunter of the East has
caught<br>The Sultan's Turret in a Noose of Light.
_____________________________________________<br>______________________________________<br>"Awake,
my Little ones, and fill the Cup<br>Before Life's Liquor in its Cup be
dry." Dreaming when Dawn's Left Hand was in the Sky<br>I heard a Voice
within the Tavern cry,<br>"Awake, my Little ones, and fill the
Cup<br>Before Life's Liquor in its Cup be dry."
_____________________________________________<br>I heard a Voice
within the Tavern
cry,<br>________________________________________<br>Before Life's
Liquor in its Cup be dry." Dreaming when Dawn's Left Hand was in the
Sky<br>I heard a Voice within the Tavern cry,<br>"Awake, my Little
ones, and fill the Cup<br>Before Life's Liquor in its Cup be dry."
_____________________________________________<br>I heard a Voice
within the Tavern cry,<br>"Awake, my Little ones, and fill the
Cup<br>________________________________________ Dreaming when Dawn's
Left Hand was in the Sky<br>I heard a Voice within the Tavern
cry,<br>"Awake, my Little ones, and fill the Cup<br>Before Life's
Liquor in its Cup be dry."
Dreaming when Dawn's Left Hand was in the
Sky<br>______________________________________<br>________________________________________<br>Before
Life's Liquor in its Cup be dry." Dreaming when Dawn's Left Hand was
in the Sky<br>I heard a Voice within the Tavern cry,<br>"Awake, my
Little ones, and fill the Cup<br>Before Life's Liquor in its Cup be
dry."
Dreaming when Dawn's Left Hand was in the
Sky<br>______________________________________<br>"Awake, my Little
ones, and fill the Cup<br>________________________________________
Dreaming when Dawn's Left Hand was in the Sky<br>I heard a Voice
within the Tavern cry,<br>"Awake, my Little ones, and fill the
Cup<br>Before Life's Liquor in its Cup be dry."
Dreaming when Dawn's Left Hand was in the Sky<br>I heard a Voice
within the Tavern
cry,<br>________________________________________<br>________________________________________
Dreaming when Dawn's Left Hand was in the Sky<br>I heard a Voice
within the Tavern cry,<br>"Awake, my Little ones, and fill the
Cup<br>Before Life's Liquor in its Cup be dry."

-----

So maybe someone will find this interesting.

--
gwern
explosion 1984 Razor server waihopai Secure Privacy Counter cybercash
unclassified

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIgg2MvpDo5Pfl1oIRCvv7AJ9KI7xOHxEoha9O9OM+qIf1NLtG1gCffsQN
u1OCmr/imXVLrI6AcQtgVdg=
=/d8Y
-----END PGP SIGNATURE-----

memo.hs
signature.asc
Reply all
Reply to author
Forward
0 new messages