espnet2.text.token_id_converter.TokenIDConverter
Less than 1 minute
espnet2.text.token_id_converter.TokenIDConverter
class espnet2.text.token_id_converter.TokenIDConverter(token_list: Path | str | Iterable[str], unk_symbol: str = '<unk>')
Bases: object
get_num_vocabulary_size() → int
ids2tokens(integers: ndarray | Iterable[int]) → List[str]
tokens2ids(tokens: Iterable[str]) → List[int]