I need to find a way to detect if a large string contains a specific substring.
Imagine that I have a full contract page converted to string in my Python program. What I want to do is to say if a specific term (a smaller string than the whole page string) exists in the page converted to string. The matching must be done semantically.
As an example, in the following case, I expect to have a good score for Query 1 and a bad score for Query 2. Notice that it's possible that my query has more than one sentence.
Query 1
"The supplier will accomplish the fulfill the delivery of the products in one week"
Query 2
"I like Phil Colins"
Page text
"The supplier will be paid annually in jully.
The delivery of products will be made in one week.
......... "
How would you do this task?