def gen(self, init_state=None):
        state = init_state or (BEGIN,) * self.state_size
        while True:
            next_word = self.move(state)
            if next_word == END: break
            yield next_word
            state = tuple(state[1:]) + (next_word,)
Starting either with a naive BEGIN state, or the provided `init_state`
dataset/ETHPy150Open jsvine/markovify/markovify/chain.py/Chain.gen