Quepy is a python framework in which you can specify how to handle questions (in natural language) in order to generate a database query that answers them. Freebase is a HUGE database that contains A LOT of enciclopedic information about everything.
You can find a tutorial here: http://quepy.readthedocs.org/en/latest/tutorial.html The full code here: http://github.com/machinalis/quepy And the full documentation here: http://quepy.readthedocs.org/ Demo: http://quepy.machinalis.com/