AskMerlin, your AI expert system guru oracle advisor

maxm maxmcorp at worldonline.dk
Mon Oct 29 13:17:03 EST 2001


"Ron Stephens" <rdsteph at earthlink.net> wrote in message
news:3BDC9411.18C441FA at earthlink.net...

> x = (self._getGoogleHits(self.question + ' ' + reply))
>                 y = (self._getGoogleHits(reply))
>
> I am not sure what the significance of the (self.question + ' ' +reply)
is.
> Specifically, what is the significance of the two quotation marks in the
> middle? Doe sit just ad a space between the two strings (question and
> reply), or does it do something else? I tried the program without hte two
> quotes and it didn't seem to change the operation noticeably.

The program works by sending questions and possible answers to google at the
same time. Then it counts the hits for each combination.

"Who wrote linux"

   "Linus Torvalds"
   "Bill Gates"
   "Steve Jobs"

So question + ' ' + reply:

"Who wrote linux Linus Torvalds" (49,800 hits)
"Who wrote linux Bill Gates"     (23,900 hits)
"Who wrote linux Steve Jobs"     (18,000 hits)

and question + reply:

"Who wrote linuxLinus Torvalds" (did not match any documents)
"Who wrote linuxBill Gates"     (did not match any documents)
"Who wrote linuxSteve Jobs"     (did not match any documents)

These searchstrings are not as accurate as the first, but as the program is
all about statistical probabilities, you can get sensible reples though your
input data is not as good as it can be.

In this case it is no god though, and multiChoiceGuesser would just return
index 0 "Linus Torvalds". Purely by luck.

regards Max M





More information about the Python-list mailing list