src/transformers/models/luke/tokenization_luke.py/LukeTokenizer/encode_plus
class LukeTokenizer:    def encode_plus(
        self,
        text: Union[TextInput],
        text_pair: Optional[Union[TextInput]] = None,
        entity_spans: Optional[EntitySpanInput] = None,
        entity_spans_pair: Optional[EntitySpanInput] = None,
        entities: Optional[EntityInput] = None,
        entities_pair: Optional[EntityInput] = None,
        add_special_tokens: bool = True,
        padding: Union[bool, str, PaddingStrategy] = False,
        truncation: Union[bool, str, TruncationStrategy] = False,
        max_length: Optional[int] = None,
        max_entity_length: Optional[int] = None,
        stride: int = 0,
        is_split_into_words: Optional[bool] = False,
        pad_to_multiple_of: Optional[int] = None,
        return_tensors: Optional[Union[str, TensorType]] = None,
        return_token_type_ids: Optional[bool] = None,
        return_attention_mask: Optional[bool] = None,
        return_overflowing_tokens: bool = False,
        return_special_tokens_mask: bool = False,
        return_offsets_mapping: bool = False,
        return_length: bool = False,
        verbose: bool = True,
        **kwargs
    ) -> BatchEncoding:
        """
        Tokenize and prepare for the model a sequence or a pair of sequences.

        .. warning:: This method is deprecated, ``__call__`` should be used instead.

        Args:
            text (:obj:`str`):
                The first sequence to be encoded. Each sequence must be a string.
            text_pair (:obj:`str`):
                The second sequence to be encoded. Each sequence must be a string.
            entity_spans (:obj:`List[Tuple[int, int]]`, :obj:`List[List[Tuple[int, int]]]`, `optional`)::
                The first sequence of entity spans to be encoded. The sequence consists of tuples each with two
                integers denoting character-based start and end positions of entities. If you specify
                :obj:`"entity_classification"` or :obj:`"entity_pair_classification"` as the ``task`` argument in the
                constructor, the length of each sequence must be 1 or 2, respectively. If you specify ``entities``, the
                length of the sequence must be equal to the length of ``entities``.
            entity_spans_pair (:obj:`List[Tuple[int, int]]`, :obj:`List[List[Tuple[int, int]]]`, `optional`)::
                The second sequence of entity spans to be encoded. The sequence consists of tuples each with two
                integers denoting character-based start and end positions of entities. If you specify the ``task``
                argument in the constructor, this argument is ignored. If you specify ``entities_pair``, the length of
                the sequence must be equal to the length of ``entities_pair``.
            entities (:obj:`List[str]` `optional`)::
                The first sequence of entities to be encoded. The sequence consists of strings representing entities,
                i.e., special entities (e.g., [MASK]) or entity titles of Wikipedia (e.g., Los Angeles). This argument
                is ignored if you specify the ``task`` argument in the constructor. The length of the sequence must be
                equal to the length of ``entity_spans``. If you specify ``entity_spans`` without specifying this
                argument, the entity sequence is automatically constructed by filling it with the [MASK] entity.
            entities_pair (:obj:`List[str]`, :obj:`List[List[str]]`, `optional`)::
                The second sequence of entities to be encoded. The sequence consists of strings representing entities,
                i.e., special entities (e.g., [MASK]) or entity titles of Wikipedia (e.g., Los Angeles). This argument
                is ignored if you specify the ``task`` argument in the constructor. The length of the sequence must be
                equal to the length of ``entity_spans_pair``. If you specify ``entity_spans_pair`` without specifying
                this argument, the entity sequence is automatically constructed by filling it with the [MASK] entity.
            max_entity_length (:obj:`int`, `optional`):
                The maximum length of the entity sequence.
        """
        # Backward compatibility for 'truncation_strategy', 'pad_to_max_length'
        padding_strategy, truncation_strategy, max_length, kwargs = self._get_padding_truncation_strategies(
            padding=padding,
            truncation=truncation,
            max_length=max_length,
            pad_to_multiple_of=pad_to_multiple_of,
            verbose=verbose,
            **kwargs,
        )

        return self._encode_plus(
            text=text,
            text_pair=text_pair,
            entity_spans=entity_spans,
            entity_spans_pair=entity_spans_pair,
            entities=entities,
            entities_pair=entities_pair,
            add_special_tokens=add_special_tokens,
            padding_strategy=padding_strategy,
            truncation_strategy=truncation_strategy,
            max_length=max_length,
            max_entity_length=max_entity_length,
            stride=stride,
            is_split_into_words=is_split_into_words,
            pad_to_multiple_of=pad_to_multiple_of,
            return_tensors=return_tensors,
            return_token_type_ids=return_token_type_ids,
            return_attention_mask=return_attention_mask,
            return_overflowing_tokens=return_overflowing_tokens,
            return_special_tokens_mask=return_special_tokens_mask,
            return_offsets_mapping=return_offsets_mapping,
            return_length=return_length,
            verbose=verbose,
            **kwargs,
        )