For example I have this situation:
on server we have list of words:
{'word1', 'word2', 'word3', 'word4'}
User send request to the server with some text:
"some text here word1. many many other text word4"
Server must processing this input text, find all words in this text from server list and mark this words and send resulting text to the user:
"some text here <mark>word1<mark>. many many other text <mark>word4<mark>"
It is main idea, main concept. At this moment I must implement this logic.
So, I ask you about help.
It is necessary for me to be defined technologies and instruments.
What instruments you can recommend for this task?
Here is the naive solution:
Better solution should use regular expression to avoid replacement of word fragments, e.g.
wo<mark>man</mark>. You should create regex like"\\b" + word + "\\b".But I’d suggest you to check out ready for use engines like Solr (or Lucine).