def add(self, iterable):
		prefix = [self.start] * self.level
		for item in iterable:
			key = " ".join(prefix)
			if not key in self.chain:
				self.chain[key] = dict()
			
			if item in self.chain[key]:
				self.chain[key][item] += 1
			else:
				self.chain[key][item] = 1
			
			prefix.append(item)
			prefix.pop(0)
Insert an iterable (pattern) item into the Markov chain.
dataset/ETHPy150Open capnrefsmmat/seuss/Markov.py/MarkovChain.add