跳转至

Encode Inputs

译者:片刻小哥哥

项目地址:https://huggingface.apachecn.org/docs/tokenizers/api/encode-inputs

原始地址:https://huggingface.co/docs/tokenizers/api/encode-inputs

These types represent all the different kinds of input that a Tokenizer accepts when using encode_batch() .

TextEncodeInput

tokenizers.TextEncodeInput

Represents a textual input for encoding. Can be either:

alias of Union[str, Tuple[str, str], List[str]] .

PreTokenizedEncodeInput

tokenizers.PreTokenizedEncodeInput

Represents a pre-tokenized input for encoding. Can be either:

alias of Union[List[str], Tuple[str], Tuple[Union[List[str], Tuple[str]], Union[List[str], Tuple[str]]], List[Union[List[str], Tuple[str]]]] .

EncodeInput

tokenizers.EncodeInput

Represents all the possible types of input for encoding. Can be:

alias of Union[str, Tuple[str, str], List[str], Tuple[str], Tuple[Union[List[str], Tuple[str]], Union[List[str], Tuple[str]]], List[Union[List[str], Tuple[str]]]] .



回到顶部