Learn 100 digits of pi at lightning speed
Learn 100 digits of pi at lightning speed.
In a previous post, I wrote about the Secret to Pi. I wrote about the method I used to learn 100 digits of pi in under an hour and remember them days later without extra practice.
While memorizing the digits of pi using this method, I realized that I was spending most of my time trying to think up words that would translate to the digits. I tried to think of the longest word I could. Sometimes I would screw up and use a word that did not translate to the correct digits. I spent 2/3rds of my time just thinking of good words, images, vivid pictures. It was hard and slow.
So, I decided to make a computer program to find the words and optimize everything for me. I did, and I’m releasing the code under GPLv3. Of course, all the code is PYthon2.5. Please allow me describe it to you. With the words precomputed, I can learn pi as quickly as I can tell a story!
At the top above, I linked to a page which I generated automatically using these libraries I’m releasing.
There are a few libraries. They all require NLTK. NLTK is an excellently-designed, well-developed, actively-maintained open-source natural language parsing library. It has many (nearly 1GB of) corpora.
First, generate_nouns.py is a script. We need to automatically generate a good, long list of concrete nouns for you to have strong images and remember the story of pi visually. It uses the CMUDict Pronunciation Corpus which is in nltk.corpus.cmudict. It also uses the wordnet corpus in nltk.wordnet. The script does some intelligent processing to filter out archaic words, curse words, and abstract nouns. Run generate_nouns.py at the command line to create a nouns.csv file, or just download my copy. 50-75% are very good, concrete, vivid nouns for this purpose. If you can help me get a higher percentage/more good nouns, please tell me.
Second, there is soundmap.py. Soundmap.py is a library (import soundmap) that you can use to convert a word or phrase into the corresponding digits. To be perfectly flexible, it loads a file which describes how to match which sounds to which digits. I provided the sounds.csv file which is the one I use. I haven’t tried to figure out what would be the optimal configuration yet, but maybe you can :). This also uses the CMUDict Pronunciation corpus (of course). Call soundmap.convert_to_digits(phrase) to have it return a string of digits.
Finally, there is mapwords.py. Mapwords.py is a library that takes in a string of digits (such as the digits in pi) and uses the nouns.csv list of nouns and soundmap.py to figure out the optimal sequence of words for people to remember that sequence of digits. It also has a couple hundred digits of the famed constant inside the library: mapwords.pi. Simply call mapwords.get_best_mapping(mapwords.pi) for it to return a list of words.
You can put all these together and quickly learn thousands of digits of pi. Here’s a great page with many digits to throw into the program.
[?]
You win at the Internet.
Tom
14 Mar 08 at 12:20 am
Hey Joe,
These are tremendous.
If you’re interested in generating lists of highly imageable, concrete nouns, then you might want to check out the MRC Psycholinguistics Databsase (Kucera & Francis, 1967):
http://www.psy.uwa.edu.au/mrcdatabase/mrc2.html
It’s what we use if we want to compile a list of words for experiment stimuli.
Yours,
Greg
Greg Detre
15 Mar 08 at 11:31 pm
Oh, one more thing - it may be that you’re already doing this, but I had an idea a while ago to try using the Levenshtein distance between the transcribed pronunciations in the CMU Pronouncing dictionary, as a simpler way of estimating how similar two words sound to one another. See the free_rhycall section here:
http://www.princeton.edu/~gdetre/software
This works very well for the words in the CMU Pronouncing Dictionary - it would be cooler still if it were to fall back on your SOUNDEX-style approach for unknown words.
Greg Detre
15 Mar 08 at 11:57 pm
Hey, I wan’t to try this to help me memorize pi digits for our school contest. I’ve won the contest for the past 4 years getting around 500 and not trying to do any better. That was all straight up number memorization, though, so I want to try this method so I can beat the school record before I graduate. I was wondering if there was a list of words already made up for the digits. Alot of the links in this article are not working for me
Zach
29 Sep 08 at 11:32 pm
I memorized pi to 46 digits in days just taking around 5-10 a day now i can recite it from memory
Austiep
17 Nov 08 at 11:28 pm