How to build a basic search engine and use neural network learning in Python