gusl: (Default)
[personal profile] gusl
In the last 2 hours, I created a little shell app in Python, which presents flashcards for vocabulary learning. I'm happy because I never touched Python code before.
* you call the app passing your username and the vocabulary file
* it presents a random word in L1, and then asks if you remember the corresponding word in L2
* it records your responses and reaction time
* when you quit, it serializes this information to a file (rather than using a text file... I'm wondering if this will matter)

ToDo:
* respond to single keystrokes (spare my poor Enter key). DONE
* use machine learning to model forgetting, and the spacing effect
* optimize the flashcard schedule accordingly, to maximize retention
* eventually, use information like POS, semantic relations, word length

I suspect that an optimal active learning schedule (to minimize uncertainty about the user model) might be pretty close to the schedule that maximizes retention.

Here's a neat reflective feature of Python: by using 'input', you can let the user ask the value of any variable by naming it.

(no subject)

Date: 2009-05-05 12:58 am (UTC)
From: [identity profile] darius.livejournal.com
Why not put it up on github? I might contribute.

(no subject)

Date: 2009-05-05 01:45 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
Nice idea. But this script is my first Python program, and it probably shows.
I also want to implement the machine learning component.

What would you contribute?

(no subject)

Date: 2009-05-05 02:01 am (UTC)
From: [identity profile] darius.livejournal.com
Most likely just tidy up the code -- I'm kind of compulsive and it's an easy way for me to show off. But that could help you learn Python faster and I might have a use for a flashcard program.

(no subject)

Date: 2009-05-05 02:05 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
After I reinstalled cygwin (in order to get rxvt, so I can see accents), and opened a new shell, my code mysteriously stopped working:

$ python start.py gusl fin2
Traceback (most recent call last):
  File "start.py", line 9, in 
    import msvcrt
ImportError: No module named msvcrt


Any ideas?

(no subject)

Date: 2009-05-05 02:15 am (UTC)
From: [identity profile] darius.livejournal.com
I haven't used cygwin in a long time, being on a Mac. If you use "python -v" or "python -vv" it tells you more about where it's looking for modules. See where you have msvcrt on your filesystem and compare that to where your Python is actually loading stuff from, unless you have any better idea.

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags