ByteLevel Decoder
This decoder is to be used in tandem with the ByteLevel PreTokenizer.
( pad_token = '<pad>' word_delimiter_token = '|' cleanup = True )
Parameters
str
, optional, defaults to <pad>
) —
The pad token used by CTC to delimit a new token.
str
, optional, defaults to |
) —
The word delimiter token. It will be replaced by a bool
, optional, defaults to True
) —
Whether to cleanup some tokenization artifacts.
Mainly spaces before punctuation, and some abbreviated english forms.
CTC Decoder
( )
Parameters
str
, optional, defaults to ▁
) —
The replacement character. Must be exactly one character. By default we
use the ▁ (U+2581) meta symbol (Same as in SentencePiece).
bool
, optional, defaults to True
) —
Whether to add a space to the first word if there isn’t already one. This
lets us treat hello exactly like say hello.
Metaspace Decoder