class_docstr: Byte-encodes text.
class_docstr_tok: ["Byte-encodes","text","."]
docstr: Constructs ByteTextEncoder.
  
  Args:
    additional_tokens: `list<str>`, list of additional tokens. These will be
      assigned vocab ids `[1, 1+len(additional_tokens)]`. Useful for things
      like "end-of-string" tokens (e.g. "<EOS>").
code: def __init__(self, additional_tokens=None):
      """Constructs ByteTextEncoder.
  
      Args:
        additional_tokens: `list<str>`, list of additional tokens. These will be
          assigned vocab ids `[1, 1+len(additional_tokens)]`. Useful for things
          like "end-of-string" tokens (e.g. "<EOS>").
      """
      (
          self._additional_tokens,
          self._additional_tokens_re,
      ) = _prepare_reserved_tokens(additional_tokens)
      # Note that internally everything is 0-indexed. Padding is dealt with at the
      # end of encode and the beginning of decode.
      self._additional_token_to_id = dict(
          zip(
              self._additional_tokens,
              range(len(self._additional_tokens)),
          )
      )
  
imports: from __future__ import unicode_literals
  import abc
  import hashlib
  import json
  import re
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 1 to create a new ByteTextEncoder object from inherited base classes: TextEncoder with example: obj = ByteTextEncoder(additional_tokens)