Пример #1
0
def label_seq(string):
    idxs = font.indexify(string)
    return idxs
Пример #2
0
def label_seq(string):
    idxs = font.indexify(string)
    result = np.ones((len(idxs) * 2 + 1,), dtype=np.int32) * -1
    result[np.arange(len(idxs)) * 2 + 1] = idxs
    print result
    return result
Пример #3
0
def label_seq(string):
    idxs = font.indexify(string)
    result = np.ones((len(idxs) * 2 + 1, ), dtype=np.int32) * -1
    result[np.arange(len(idxs)) * 2 + 1] = idxs
    print result
    return result
Пример #4
0
def label_seq(string):
    idxs = font.indexify(string)
    return idxs