def load_data_trainable(dataset, rottenTomato=False):
    """
    Loads MR polarity data from files, splits the data into words and generates labels.
    Returns split sentences and labels.
    """
    # Load data from files
    if rottenTomato:
        template_txt = '../data/rt-data-nlp4jtok/%s'
    else:
        template_txt = '../data/tweets/%s'

    pathtxt = template_txt % dataset

    x_text=[line.split('\t')[2] for line in open(pathtxt, "r").readlines()]
    x_text = [sent for sent in x_text]

    y = []
    if rottenTomato:
        for line in open(pathtxt, "r").readlines():
            senti=line.split('\t')[1]
            if  senti == 'neutral':
                y.append([0, 0, 1, 0, 0])

            elif senti == 'positive':
                y.append([0, 0, 0, 1, 0])
            elif senti == 'very_positive':
                y.append([0, 0, 0, 0 ,1])
            elif senti == 'negative':
                y.append([0, 1, 0, 0 ,0])
            elif senti == 'very_negative':
                y.append([1, 0, 0, 0 ,0])

    else:
        for line in open(pathtxt, "r").readlines():
            senti=line.split('\t')[1]
            if  senti == 'objective':
                y.append([0, 1, 0])

            elif senti == 'positive':
                y.append([0, 0, 1])

            else:  # negative
                y.append([1, 0, 0])

    return [x_text, y]