Python Liberation Front

the Happy Hacker: Do Not Emulate this Code


Well, the AskMerlin script is running and it works fine. It's fun but raw. The source code (so you can see how it works) is available at either

Ask Merlin, source code for command line version, requires pyGoogle and a valid Google API license number or,

alternatively, here is the source code for a simpler version that does not require pyGoogle nor a Google API license, Ask Merlin, stand alone version

I will do more work on it before Christmas, to refine the algorithm. Meanwhile, who says you can't write spaghetti code with Python?

Some hints and results: The more detailed you make your question, especially the more key words you give, the more meaningful will be Merlin's answer. Curious results:

When asked "Is there a God?" and given the possible choices "Yes, No, Maybe", Merlin answers "Maybe". If given only the choices "Yes, No", Merlin answers "Yes". Wise, you say? Well, if you ask "What is the best programming language for ease of use and readability", and give the choices "perl, python, ruby, java" Merlin answers "python". But, if you ask "which is the best programming language for regular expressions and text processing", Merlin answers "perl". Now, If you simply ask, "What is the best programming language, Merlin answers "python".

Merlin will get smarter and wiser over time. Perhaps you'd like to help educate him?


Posted by Ron Stephens @ 2004-11-28 17:05:27 [permalink]
Categories: python