L
L
livemirsi2016-02-25 01:26:50
PHP
livemirsi, 2016-02-25 01:26:50

Text search (search for occurrences)?

Good afternoon. The task is to analyze, for example, an article for occurrences of phrases or words:
- word search (stemming: apple, apples)
- search for two words (stemming) with an analysis of the distance between them, for example: the distance between two given words is no more than (1,2, 3,4 .....) words, the distance between words is no more than (1,2,3,4 .....) characters (spaces, dashes, letters).
- search for a word (stemming) in front of or behind which, at a distance of (1,2,3,4 ...) characters or words, there is another word (s).
I am looking for some tools, algorithms, in order to understand how to implement it correctly.
Articles will be in English. In principle, it’s not difficult to get word options, after translating the text into an array of characters or words, and start raping them)))) I also look at search engines, they have powerful query systems, but this is to drive articles into the index, then search on them, then delete, bring in new ones, somehow dreary.
I would be glad to hear any opinions on the implementation of the task.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2016-02-25
@livemirsi

I can offer this option: How to determine the similarity of two strings?

I
Ilya Trusov, 2016-02-25
@artgrosvil

If I understood the problem correctly, then read this .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question