from random import choice

class MarkovChain(object):
    """ An interface for signle-word states Markov Chains """

    def __init__(self, text=None):
        self._states_map = {}
        
        if text is not None:
            self.add_text(text)

    def add_text(self, text, separator=" "):
        """ Adds text to the markov chain """
        word_list = text.split(separator)
        for i in range(0, len(word_list)-1):
            self._states_map.setdefault(word_list[i], []).append(word_list[i+1])
        return self

    def get_word(self, key):
        """ Returns a word from Markov Chain associated with the key """
        values = self._states_map.get(key)
        return choice(values) if values is not None else None

@@ -179,17 +179,8 @@
  %7B%7D%0A
-        %0A
     
@@ -517,16 +517,270 @@
 n self%0A%0A
+    def add_text_collection(self, text_col, separator=%22 %22):%0A        %22%22%22 Adds a collection of text strings to the markov chain %22%22%22%0A        for line in text_col:%0A            if line not in %5B%22%22, %22%5Cn%22, None%5D:%0A                self.add_text(line, separator)%0A%0A%0A
     def 

Add Markov Chain representation class