def chars_dict_builder(X):
    """
    Create a character 2 indices mapping.
    Preprocess step for Character level CNN classification.
    """
    chars_set = set(" ".join([sent for sent in X]))
    print('total number of chars: ', len(chars_set))

    char_indices = dict((c, i) for i, c in enumerate(chars_set))
    return char_indices