Marks all characters in given `text`, that doesn't exists within any
    element of `sents` with `1` character, other characters (within sentences)
    will be marked with `0`
    Used in training process
    >>> text = 'привет. меня зовут аня.'
    >>> sents = ['привет.', 'меня зовут аня.']
    >>> labels = text2labels(text, sents)
    >>> ' '.join(text)
    >>> 'п р и в е т .   м е н я   з о в у т   а н я .'
    >>> ' '.join(labels)
    >>> '0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

def text2labels(text, sents):
    '''
    Marks all characters in given `text`, that doesn't exists within any
    element of `sents` with `1` character, other characters (within sentences)
    will be marked with `0`
    Used in training process
    >>> text = 'привет. меня зовут аня.'
    >>> sents = ['привет.', 'меня зовут аня.']
    >>> labels = text2labels(text, sents)
    >>> ' '.join(text)
    >>> 'п р и в е т .   м е н я   з о в у т   а н я .'
    >>> ' '.join(labels)
    >>> '0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
    '''
    labels = [c for c in text]
    for sent in sents:
        start = text.index(sent)
        finish = start + len(sent)
        labels[start:finish] = '0' * len(sent)
    for i, c in enumerate(labels):
        if c != '0':
            labels[i] = '1'
    return labels