def METHOD_NAME(self, batch):
    "return a list of sequence from a list of index arrays"
    ret = []
    filter_list = set([self.pad_id, self.sos_id, self.eos_id])
    for seq in batch:
        try:
            l = seq.index(self.eos_id)
        except:
            l = len(seq)
        ret.append(
            " ".join(
                self.vocab[token]
                for token in seq[:l]
                if not token in filter_list
            )
        )
    return ret