deeppavlov/models/morpho_tagger/common_tagger.py
def to_one_hot(x, k):
    """
    Takes an array of integers and transforms it
    to an array of one-hot encoded vectors
    """
    unit = np.eye(k, dtype=int)
    return unit[x]
def to_one_hot(x, k):
    unit = np.eye(k, dtype=int)
    return unit[x]
def to_one_hot ( x , k ) : unit = np . eye ( k , dtype = int ) return unit [ x ]
Takes an array of integers and transforms it
    to an array of one-hot encoded vectors
Takes an array of integers and transforms it to an array of one - hot encoded vectors