I'm looking for efficient and fast php solution, that can select portion of text from document and slice it based on keywords without loosing meaning of content similar as stack overflow search engine do.
I found one similar question for C# but without any examples.
How would you implement such functionality in PHP?