def read_corpus ( file_name ) : with io . open ( file_name , encoding = 'utf-8' ) as data_file : return yaml . load ( data_file )
python read text file as corpus
Read and return the data from a corpus json file .
def read_corpus(file_name):
    """
    Read and return the data from a corpus json file.
    """
    with io.open(file_name, encoding='utf-8') as data_file:
        return yaml.load(data_file)