lines 63 and 64 need to be indented to match self (in the line above) to prevent the error:
UnboundLocalError: local variable 'k' referenced before assignment
62 self._add_to_corpus(parsed, key, k, next_key)
63 if k == len(parsed) - 3 and next_key is None:
64 next_key = (parsed[k + 1], parsed[k + 2])
lines 63 and 64 need to be indented to match self (in the line above) to prevent the error:
UnboundLocalError: local variable 'k' referenced before assignment
62 self._add_to_corpus(parsed, key, k, next_key)
63 if k == len(parsed) - 3 and next_key is None:
64 next_key = (parsed[k + 1], parsed[k + 2])