def text_to_sentences(text, sentence_sep="\n\n", word_sep="\n", label_sep="\t"):
    """
    Converts text to sentences (a list of list of word) and labels.
    """
    def word_label_condition(word_label):
        """
        When words and labels are taken into account
        """
        c1 = label_sep in word_label
        c2 = c1 and (len(word_label.split(label_sep)[0]) > 0)
        c3 = c1 and (len(word_label.split(label_sep)[1]) > 0)
        return c2 and c3

    def sentence_condition(sentence):
        """
        When sentences are taken into account
        """
        return len(sentence) > 0

    sentences_with_labels = [[tuple(word_label.split(label_sep)) for word_label in sentence.split(word_sep) if
                              word_label_condition(word_label)] for sentence in text.split(sentence_sep) if
                             sentence_condition(sentence)]

    return sentences_with_labels