def load_data(path):
    """ Load input data from a given path. Data is stored as word,label\nword,label\n ...

    :param path: path to file
    :return: (list of words, list of labels)
    """
    words = []
    labels = []
    with open(path, encoding='utf-8') as f:
        lines = f.read().splitlines()
        for line in lines:
            l = line.split(',')
            words.append(l[0])
            labels.append((int(l[1])))

    return words, labels