-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On Sat, Sep 13, 2008 at 4:55 AM, David A. Harding wrote:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREKAAYFAkkScBIACgkQvpDo5Pfl1oLyhwCgi+itpD3A/FkpmWkNgeOJ6ikM
2OwAn2NIi3chKkEKkbxaWnw/Gsykseny
=RkJm
-----END PGP SIGNATURE-----
>
> On Fri, Sep 12, 2008 at 10:58:17PM -0400, Gwern Branwen wrote:
>> How did you generate it, by hand or with a program? Is it really as
>> simple as chunking 2 by 2?
>
> I learn lyrics with the approach NotYourBroom describes. I've appended
> to the end of this email the short bash shell script I use to generate
> Mnemosyne question and answer pairs. Note: for programming simplicity,
> I produce slightly different output than what NotYourBroom described.
> For example:
>
> [EMAIL PROTECTED]:~$ mnemlyric
> gilbert_and_sullivan-major_modern_general.txt
> First line of gilbert_and_sullivan-major_modern_general.txt:
> 1 I am the very model of a modern Major-General
> 1 I am the very model of a modern Major-General....
> 2 I've information vegetable, animal, and mineral.
> 2 I've information vegetable, animal, and mineral.....
> 3 I know the kings of England, and I quote the fights historical
> 3 I know the kings of England, and I quote the fights historical....
> 4 From Marathon to Waterloo, in order categorical.
> 4 From Marathon to Waterloo, in order categorical.....
> END: gilbert_and_sullivan-major_modern_general.txt
>
> (Lyric file truncated for example.)
>
> I added the line numbers so I'd know what refrain I'm on. For example:
>
> [EMAIL PROTECTED]:~$ mnemlyric
> gilbert_and_sullivan-major_modern_general.txt | grep -A1 'General\.\.'
> 12 I am the very model of a modern Major-General.....
> 13 I know our mythic history, King Arthur's and Sir Caradoc's;
> --
> 24 I am the very model of a modern Major-General.....
> 25 In fact, when I know what is meant by "mamelon" and "ravelin",
> --
> 36 I am the very model of a modern Major-General.....
> END: gilbert_and_sullivan-major_modern_general.txt
>
> A few notes on learning lyrics this way: it's harder than learning
> lyrics in line order, but I think Mnemosyne makes it take less total
> time. Moreover, when I learned lyrics sequentially, forgetting a single
> line often meant I couldn't remember the rest of the lyric. Learning
> lyrics non-sequentially helps me skip past anything I forget -- and
> often, with a cool head and a little improvisation, the audience doesn't
> even notice my gaffe.
>
> Code:
>
> #!/bin/bash -eu
>
> # If called without an argument, print help
> if [ $# -lt 1 ]
> then
> echo "$0 <file> (don't worry about empty lines)"
> exit 1
> fi
>
> # Variables
> FILENAME="$1"
>
> # Print first question
> echo "First line of $1:"
>
> # Remove empty lines, number remaining lines, and loop
> sed '/^$/d' $FILENAME | nl | while read line
> do
> # Print answer and next question
> echo $line
> echo $line....
> done
>
> # Print final answer
> echo "END: $FILENAME"
>
> -Dave
That's interesting. Here's the approach I'm trying; a Haskell script as before:
-----
main = interact (unlines . tabify . couplet . lines)
couplet [] = []
couplet (_:[]) = []
couplet (a:b:c) = [((erase a), b), (a,b)] ++ [(a, (erase b)), (a,b)]
++ couplet c
where erase = map (const '_')
tabify = map (\((x,y), (z,a)) -> x ++ "<br>" ++ y ++ "\t" ++ z ++
"<br>" ++ a) . tuplize
where tuplize [] = []
tuplize (a:b:c) = [(a,b)] ++ tuplize c
-----
The code is a bit ugly, but it seems to work:
[EMAIL PROTECTED]:27749~/bin/haskell>cat foo
oh say can you see
by the dawn's early light
what we so proudly hailed
by the twilight's last gleaming?
does that bright blue stars
yet wave still
[EMAIL PROTECTED]:27750~/bin/haskell>cat foo | runhaskell memo2.hs
__________________<br>by the dawn's early light oh say can you
see<br>by the dawn's early light
oh say can you see<br>_________________________ oh say can you
see<br>by the dawn's early light
_________________________<br>by the twilight's last gleaming? what we
so proudly hailed<br>by the twilight's last gleaming?
what we so proudly hailed<br>________________________________ what we
so proudly hailed<br>by the twilight's last gleaming?
___________________________<br>yet wave still does that bright blue
stars<br>yet wave still
does that bright blue stars<br>______________ does that bright blue
stars<br>yet wave still
Does adding the line number really do that much for you?
--
gwern
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"mnemosyne-proj-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mnemosyne-proj-users?hl=en
-~----------~----~----~----~------~----~------~--~---