def get_data(filename):
    ''' Loads the data from file
    Inputs:
        filename (String): absolute path to the datafile
    Returns:
        X (list[string]): list of contents of documents
        y (list[integer]): labels of documents
        vocab : Vocab object corresponding to words in X
    '''
    
    print ('Reading data from {}'.format(filename))
    with open(filename, 'r') as datafile:     
        data = [line.strip().split(',', maxsplit=1) for line in datafile]
        data_text = list(map(lambda x: x[1], data))
        data_label = list(map(lambda x: parse_label(x[0]), data))
    vocab = Vocab()    
    words = set(' '.join(data_text).lower().split())
    vocab.construct(list(words))
    return data_text, data_label, vocab
 Loads the data from file
    Inputs:
        filename (String): absolute path to the datafile
    Returns:
        X (list[string]): list of contents of documents
        y (list[integer]): labels of documents
        vocab : Vocab object corresponding to words in X
    
Model_fastText/old_code/utils.py