'Reads the entire corpus, and returns in a list.'

def corpus(self):

    tf.logging.info('Reading    corpus...')
    corpus = []
    while True:
        (sentences, is_last) = self.read()
        corpus.extend(sentences)
        if is_last:
            break
    tf.logging.info(('Read    %d    sentences.' % len(corpus)))
    return corpus
