def _int_to_tag(tag_int, tag_vocab_size): # creates the one-hot vector a = np.empty(tag_vocab_size) a.fill(0) np.put(a, tag_int, 1) return a