The first stage of the algorithm is iterating over all possible n-grams and finding the matching suffixes. Then we get the corresponding sentences and for each sentence we track the words from the pattern that are also in the sentence.
The bug: when marking the matched words in the pattern, the code was iterating from word index 0 to the n-gram length, but the n-gram has an offset in the pattern. Apparently this bug existed since the first version of this project.
The PR fixes that and tries to improve the naming to make the intent clearer.
The first stage of the algorithm is iterating over all possible n-grams and finding the matching suffixes. Then we get the corresponding sentences and for each sentence we track the words from the pattern that are also in the sentence.
The bug: when marking the matched words in the pattern, the code was iterating from word index 0 to the n-gram length, but the n-gram has an offset in the pattern. Apparently this bug existed since the first version of this project.
The PR fixes that and tries to improve the naming to make the intent clearer.