Is there an effective algorithm to perform reverse full-text search?

I have a limited list of thousands of keywords (each keyword contains one or more words) in the database. I want to efficiently find which keywords are in a given Enter the text without having to test each keyword one by one (full table scan). It would be better to allow matching some misspelled words in the text but not required. Any algorithm/article suggestion to solve this problem?
I think some of the answers so far misunderstood the question asked. My understanding is that you have a ( A big) word list and a (big) text body. You want to know what the two lists have in common. Is this correct?

If so, this is not a full text problem at all. Basically, you only have two word lists (the original keyword and the word list in the input text). If you sort the two lists , You can scan the two lists at the same time and extract the common words.

Assuming that the keyword list has been sorted, you can extract and sort words from the text body in O(n logn) time, and then scan at the same time The two lists are O(nm) (where n is the number of words) the text body and m is the number of words in the keyword list).

I have in the database A limited list of thousands of keywords (each keyword contains one or more words). I want to efficiently find which keywords are in a given input text without having to test each keyword one by one (full table scan ). It would be better to allow matching some misspelled words in the text but not necessary. Any algorithm/article suggestion to solve this problem?

I think some of the answers so far misunderstood the question asked. My understanding is that you have a (large) list of words and a (large) text Text. You want to know what the two lists have in common. Is this correct?

If so, this is not a full text problem at all. Basically, you only have two word lists (the original keyword and the word list in the input text). If you sort the two lists , You can scan the two lists at the same time and extract the common words.

Assuming that the keyword list has been sorted, you can extract and sort words from the text body in O(n logn) time, and then scan at the same time The two lists are O(nm) (where n is the number of words) the text body and m is the number of words in the keyword list).

Leave a Comment

Your email address will not be published.