Machine learning - Algorithm suggestion for my problem using NLP I am looking for a machine learning algorithm for my problem.

I have a set of sentences like,

["The cat in the hat disabled", "A cat is a fine pet ponies.", "Dogs and cats make good pets.","I haven't got a hat."]

and the search-words like,

["cat","hat"]

I want to convert my sentence list and search-words to a vector space and find matching score between my sentence list and search-word list.

the type of output I am expecting is,

[("The cat in the hat disabled",0.9), ("A cat is a fine pet ponies.",0.5), "(Dogs and cats make good pets.",0.6),("I haven't got a hat.",0.49)]

Please suggest a machine learning algorithm for my task, if possible please share a reference link.

let me know if you have any queries or need more information.
I am currently using semanticpy for this https://github.com/josephwilk/semanticpy

I am getting key-error for many search-words. its not performing stemming and lemmatization for the sentence list but only performing for the search-words list. 

Please help on this.
There is a really good video about this topic from a PyCon in 2016. There is a pretty in-depth description on how to vectorize your sentences as well as make predictions based on those vectors.

I think that would greatly help you out. That is what I used when I was learning about how to perform sentiment analysis.