def pad_targets(xy):
    x, y = xy
    classes = np.max(y) + 1
    tmp_data_y = np.zeros((x.shape[0], classes))
    for i, dp in zip(range(len(y)), y):
        r = np.zeros(classes)
        r[dp] = 1
        tmp_data_y[i] = r
    y = tmp_data_y
    return x, y
Tokenize a string to split off punctuation other than periods
dataset/ETHPy150Open larsmaaloee/auxiliary-deep-generative-models/data_loaders/data_helper.py/pad_targets--crossover with--dataset/ETHPy150Open reefeed/wanish/wanish/tokenizers.py/PunktLanguageVars.word_tokenize