
class Generator:
    """Generates random text based on k-grams of an existing sample."""

    def __init__(self, source, k):
        """Construct a new generate using the source string and model of k-grams."""
        # do all necessary preprocessing at the time of construction
        pass

    def nextChar(self):
        """Generate and return an additional character, given current state."""
        return 'X'    # this is not correct
