A
A
agreIT2020-06-01 10:02:42
PHP
agreIT, 2020-06-01 10:02:42

Are there public algorithms for semantic search for occurrences of a substring in a string?

There is a line:

Lorem Ipsum является стандартной "рыбой" для текстов на латинице с начала XVI века.
Существует компания рога и копыта, производящая рога изобилия. Рог изобилия является...

Given a list of keywords: Find occurrences (if any) of each keyword in a string using implicit search. Those. the result of the work should be a list of found keywords:
['lorem ipsumi', 'рог изобилия', ...]

[
'lorem ipsumi' => ['Lorem Ipsum'],
'рог изобилия' => ['рога изобилия', 'Рог изобилия'],
...]

Comrades, is there an implemented algorithm for such a search?
Ps implementation optional in PHP

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2020-06-01
@2ord

Solr can highlight the found results in the text. https://lucene.apache.org/solr/guide/6_6/highlight...
Sphinx Search/Manticore too, see SNIPPET()

mysql>  CALL SNIPPETS('this is my hello world document text I am snippeting now', 'myindex', 'hello world', 5 as limit_words);
+------------------------------------------------+
| snippet                                        |
+------------------------------------------------+
|  ...  my <b>hello world</b> document text ...  |
+------------------------------------------------+
1 row in set (0.00 sec)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question