Generating Cutter numbers

Tim Chase python.list at tim.thechases.com
Sat May 20 10:43:42 EDT 2006


> I am stumped about what to do when the first letter is Q not 
> followed by U.  It says to use numbers 2-29 for the second 
> letters a-t, but that is obviously not right (for one thing t 
> would be 21, not 29).
> 
> Since you seem a little bit more experienced in library 
> science could you explain what is going on? :)

I too tried to play with it, and Steve found one of the cases
with which I was having trouble ("Q[^u]").  Additionally, is "Y"
considered a consonant or vowel for the sake of this exercise?
Other trouble came when consonants were not followed by the list
of letters given.  It also looks like the definiton of "initial
letter" seems to change a bit.  In some cases, "initial letter"
seems to refer to the first letter (which gets output
carte-blanche), and in other cases, it seems to be used to refer
to "the first letter that should be converted to a number"
(meaning the second letter of the input).

Some examples for which expected results (and the
reasoning/logic/algorithm/table behind how they were generated)
would be helpful:
"Cyr", "Cyprus", "Mbarine", "McGrady", "Sczepanski", "Yvette"

They're all are sample last-names pulled from my local phonebook.

Too bad my librarian wife is working today :)

-tkc










More information about the Python-list mailing list