I'm looking for algorithms for determine and select in some texts areas, that will be relevant some user query. Maybe select snippet, that relevant for user query in text.
Can anybody reccomend any algorithms that suitable for this task?
P.S. I saw this question: Is there an algorithm for determining the relevance of a text to a theme? But it isn't a solution for my question, because I need in select relevant area in text, and using machine learning algorithms is not suitable for this task.