Answer the question
In order to leave comments, you need to log in
What is the best js framework to use for highlighting terms in sentences?
We need a powerful javascript framework to highlight terms in sentences in order to perform complex word manipulation. For example, select all conjunctions or verbs or all parts of speech at once.
Is it possible to do this without assigning a class to each term and wrapping it in an html tag so that the text can be parsed with js?
It is understood that the texts are large.
It is assumed that the terms will be assigned js variables or objects for further work with the database.
Answer the question
In order to leave comments, you need to log in
I understand that my answer will not be a solution, but it seems to me that you are asking for some kind of fantasy. At a minimum, full-text search is already required here, and only Sphinx is suitable for its work with big data. And what do you want to load the client, which can have 2GB of memory or 16GB. The complexity of the algorithms that solve your problem is high in any case. Yes, and it is really possible to highlight such words only through Machine Learning with a huge layer of mathematics. Everything else is contentment with the correct syntax tree.
There are many algorithms, algorithms are not the most popular thing to implement in JS. Yes, and I would solve a similar problem differently, I received the text, sent it to the server, parsed it, built a syntax tree, walked through it, applied my cool algorithms. I received the data, converted it into another more suitable form for the task, and even ran the algorithms, made the necessary data structures, built indexes for access, developed a scheme for working everything together. As a result, he did what he wanted, but not on the client, but on the server ... The client would use as a data transmitter, a parser, a set of smart template engines with meta information inside the text to wrap the words of the text with additional information.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question