we have been tasked to create a simple search engine, which could search through a small set of .html documents (stored locally probably) for given text string (not exact occurence, just similarity), and sort the results based on their similarity with given query and PageRank (PageRank algorithm is to be done as well, but that's not the point of this question). To make this task easier for us, we were allowed to use any function or library which can do the text search, but I don't know any such library or function. So I'd like to ask, is there any function or library which can do such thing? PHP is preferred, but we can deal with Java or C++ as well.
Thanks a lot!
exec('grep -rl "yourstring" ')
– Daan 19 hours ago