prokbert.prokbert_tokenizer.ProkBERTTokenizer.batch_decode
- ProkBERTTokenizer.batch_decode(token_ids_list: List[List[int]], **kwargs) List[str]
Decodes multiple token ID sequences back into their original DNA sequences.
This method converts each list of token IDs in the batch back to its corresponding sequence.
- Parameters
token_ids_list (List[List[int]]) – A list of token ID sequences to be decoded. Each element in the list is a list of token IDs.
- Returns
A list containing the decoded DNA sequences.
- Return type
List[str]
- Usage Example:
>>> tokenizer = ProkBERTTokenizer(...) >>> ids = [[2, 213, 3343, 165, 2580, 248, 3905, 978, 3296, 3]] >>> sequences = tokenizer.batch_decode(ids) >>> print(sequences) ...