Suppose that skip distance is set to 1 and the OCR engine misrecognizes 'ACID' as 'ACIR.' The STM starts at the root node, as shown in Figure 7.
The skip distance is still 1, because no mismatched characters have been skipped so far.
However, since the skip distance is 1, i.e., one more character can still be skipped, the skip distance is decremented by 1.
The first parameter is inputStr; the second parameter d is a skip distance; the third parameter curNode is a trie node object initially referencing the trie's root; the fourth parameter suggestion is a string that holds the sequence of characters from the trie's root curNode.