We exploit the fact that our large text is actually a collection of relatively short sentences, and that collocated patterns must occur in the same sentence in order to be considered a rule.
we can use the sentence id of each subpattern occurrence as a kind of hash key.