class_docstr: Transforms tuples of text into tuples of vector sequences.
docstr: Encodes preprocessed strings into sequences of one-hot indices.
code: def __call__(
      self, data: Tuple[str, str]
  ) -> Tuple[List[int], List[int]]:
      """
      Encodes preprocessed strings into sequences of one-hot indices.
      """
      text_encoder, text_decoder = data[0], data[1]
      vec_encoder = self._tokenizer_encoder.encode(text_encoder)
      vec_decoder = self._tokenizer_decoder.encode(text_decoder)
      if self.max_input_len is not None:
          if len(vec_encoder) > self.max_input_len:
              vec_encoder = vec_encoder[: self.max_input_len - 1] + [
                  vec_encoder[-1]
              ]
      if self.max_output_len is not None:
          if len(vec_decoder) > self.max_output_len:
              vec_decoder = vec_decoder[: self.max_output_len - 1] + [
                  vec_decoder[-1]
              ]
          else:
              vec_decoder = vec_decoder + [0] * (
                  self.max_output_len - len(vec_decoder)
              )
  
      return vec_encoder, vec_decoder
  
file_path: headliner/headliner/preprocessing/vectorizer.py
imports: from typing import Tuple, List
  from headliner.preprocessing.tokenizer import Tokenizer
label_desc: Use image node_id 2 for calling the Vectorizer obj's underlying member method code with example usage: obj.__call__(data) and returns: vec_encoder,  vec_decoder