3 ms·
There is some bunch searching, but most of the document doesn't get searched, and the bits which get searched aren't searched for most of the keyphrases. Inste
by jodrellblank 15y ago
There is some bunch searching, but most of the document doesn't get searched, and the bits which get searched aren't searched for most of the keyphrases.
Instead of:
For phrase in keyphrases:
If phrase in document:
pass
This
For word in document:
Some_phrases = get_keyphrases_starting[word]
if document.next_5_words.find(some_phrases)
Instead of searching 100,000 keyphrases in the whole document, this searches 10 rest-of-sentences in the 5 words following a mention of 'phospholipid', 18 rest-of-sentences in the 3 word following 'proteomerase' and nothing in the text about the lab temperature, and never touches most of the keyphrases at all for the document.