def label_seq(data):
    """
    Input: 
        data: dictionary of text, begin_sentences, end_sentences
    Output:
        a sequence of labels where each token from the text is assiciated with a label:
            regular token --> O
            begin sentences token --> BS
            end sentences token --> ES
    """
    text = data["text"].split(" ")
    
    True_Begin_sentences = data["begin_sentence"]
    True_End_sentences = data["end_sentence"]
    
    labels_train = ["O"] * len(text)    
    for index in True_Begin_sentences:
        labels_train[index] ="BS"
    for index in True_End_sentences:
        labels_train[index] ="ES"
    return labels_train