def load_data_from_file(data_path):
    """
    Load data from file
    :param data_path: input file path
    :return: sentences and labels
    Examples
    sentences = [['Hello', 'World'], ['Hello', 'World']]
    labels = [['B_W', 'I_W'], ['B_W', 'I_W']]
    """
    sentences = []
    labels = []
    with open(data_path, 'r') as fr:
        lines = fr.readlines()
        for line in lines:
            sent = []
            sent_labels = []
            for word in line.strip().split():
                syllables = word.split('_')
                for i, syllable in enumerate(syllables):
                    sent.append(syllable)
                    if i == 0:
                        sent_labels.append('B_W')
                    else:
                        sent_labels.append('I_W')
            sentences.append(sent)
            labels.append(sent_labels)
    return sentences, labels
