def _build_target_tokens(self, pred):
    tokens = []
    for tok in pred:
        tok = int(tok)
        tokens.append(tok)
        if (tokens[(- 1)] == self.end_token):
            tokens = tokens[:(- 1)]
            break
    tokens = [t for t in tokens if (t < len(self.vocab))]
    tokens = self.vocab.DecodeIds(tokens).split(' ')
    return tokens
def _build_target_tokens(self, pred):
    tokens = []
    for tok in pred:
        tok = int(tok)
        tokens.append(tok)
        if (tokens[(- 1)] == self.end_token):
            tokens = tokens[:(- 1)]
            break
    tokens = [t for t in tokens if (t < len(self.vocab))]
    tokens = self.vocab.DecodeIds(tokens).split(' ')
    return tokens