Python Forum

Full Version: Search by keyword
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm making an ai in python 2.7.13 and I looked around but can't figure out how to get it to search google by keyword. Ex: instead of typing "google" than it says "what do you want to search" I want to be able to say "I want to search google" or "google search" and all it has in it is the word google. I don't think there needs to be code for this question but can anyone tell me how to do this
I don't know a whole lot about ai, but the nltk (natural language toolkit) is pretty powerful stuff: http://www.nltk.org/
This may be of help: https://pypi.python.org/pypi/sitesearcher/0.1a2
since it is itself a command line tool, I would download the source: http://pypi.python.org/pypi/sitesearcher
and examine the code to see how the search is done. You may then be able to adapt for your requirement.
There are other candidates here: https://pypi.python.org/pypi?%3Aaction=s...mit=search