class_docstr: Normalizes a tensor of UTF-8 strings.
class_docstr_tok: ["Normalizes","a","tensor","of","UTF-8","strings","."]
docstr: Normalizes a tensor of UTF-8 strings and returns offsets map.
  
  ### Example:
  
  >>> texts = ["They're", "the", "Greatest", "\xC0bc"]
  >>> normalizer = FastBertNormalizer(lower_case_nfd_strip_accents=True)
  >>> normalized_text, offsets = (
  ...   normalizer.normalize_with_offsets(texts))
  >>> normalized_text
  <tf.Tensor: shape=(4,), dtype=string, numpy=array([b"they're", b'the',
  b'greatest', b'abc'], dtype=object)>
  >>> offsets
  <tf.RaggedTensor [[0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3], [0, 1, 2, 3, 4, 5,
  6, 7, 8], [0, 2, 3, 4]]>
  
  Args:
    input: An N-dimensional `Tensor` or `RaggedTensor` of UTF-8 strings.
  
  Returns:
    A tuple `(normalized_texts, offsets)` where:
  
    normalized_texts: is a `Tensor` or `RaggedTensor`.
    offsets: is a `RaggedTensor` of the byte offsets from the output
      to the input. For example, if the input is `input[i1...iN]` with `N`
      strings, `offsets[i1...iN, k]` is the byte offset in `inputs[i1...iN]`
      for the `kth` byte in `normalized_texts[i1...iN]`. Note that
      `offsets[i1...iN, ...]` also covers the position following the last byte
      in `normalized_texts[i1...iN]`, so that we know the byte offset position
      in `input[i1...iN]` that corresponds to the end of
      `normalized_texts[i1...iN]`.
docstr_tok: ["Normalizes","a","tensor","of","UTF-8","strings","and","returns","offsets","map",".","#","#","#","Example",":",">",">",">","texts","=","[","``","They","'re","''",",","``","the","''",",","``","Greatest","''",",","``","\\xC0bc","''","]",">",">",">","normalizer","=","FastBertNormalizer","(","lower_case_nfd_strip_accents=True",")",">",">",">","normalized_text",",","offsets","=","(","...","normalizer.normalize_with_offsets","(","texts",")",")",">",">",">","normalized_text","<","tf.Tensor",":","shape=","(","4",",",")",",","dtype=string",",","numpy=array","(","[","b","''","they","'re","''",",","b'the","'",",","b'greatest","'",",","b'abc","'","]",",","dtype=object",")",">",">",">",">","offsets","<","tf.RaggedTensor","[","[","0",",","1",",","2",",","3",",","4",",","5",",","6",",","7","]",",","[","0",",","1",",","2",",","3","]",",","[","0",",","1",",","2",",","3",",","4",",","5",",","6",",","7",",","8","]",",","[","0",",","2",",","3",",","4","]","]",">","Args",":","input",":","An","N-dimensional","`","Tensor","`","or","`","RaggedTensor","`","of","UTF-8","strings",".","Returns",":","A","tuple","`","(","normalized_texts",",","offsets",")","`","where",":","normalized_texts",":","is","a","`","Tensor","`","or","`","RaggedTensor","`",".","offsets",":","is","a","`","RaggedTensor","`","of","the","byte","offsets","from","the","output","to","the","input",".","For","example",",","if","the","input","is","`","input","[","i1","...","iN","]","`","with","`","N","`","strings",",","`","offsets","[","i1","...","iN",",","k","]","`","is","the","byte","offset","in","`","inputs","[","i1","...","iN","]","`","for","the","`","kth","`","byte","in","`","normalized_texts","[","i1","...","iN","]","`",".","Note","that","`","offsets","[","i1","...","iN",",","...","]","`","also","covers","the","position","following","the","last","byte","in","`","normalized_texts","[","i1","...","iN","]","`",",","so","that","we","know","the","byte","offset","position","in","`","input","[","i1","...","iN","]","`","that","corresponds","to","the","end","of","`","normalized_texts","[","i1","...","iN","]","`","."]
code: def normalize_with_offsets(
      self, input
  ):  # pylint: disable=redefined-builtin
      r"""Normalizes a tensor of UTF-8 strings and returns offsets map.
  
      ### Example:
  
      >>> texts = ["They're", "the", "Greatest", "\xC0bc"]
      >>> normalizer = FastBertNormalizer(lower_case_nfd_strip_accents=True)
      >>> normalized_text, offsets = (
      ...   normalizer.normalize_with_offsets(texts))
      >>> normalized_text
      <tf.Tensor: shape=(4,), dtype=string, numpy=array([b"they're", b'the',
      b'greatest', b'abc'], dtype=object)>
      >>> offsets
      <tf.RaggedTensor [[0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3], [0, 1, 2, 3, 4, 5,
      6, 7, 8], [0, 2, 3, 4]]>
  
      Args:
        input: An N-dimensional `Tensor` or `RaggedTensor` of UTF-8 strings.
  
      Returns:
        A tuple `(normalized_texts, offsets)` where:
  
        normalized_texts: is a `Tensor` or `RaggedTensor`.
        offsets: is a `RaggedTensor` of the byte offsets from the output
          to the input. For example, if the input is `input[i1...iN]` with `N`
          strings, `offsets[i1...iN, k]` is the byte offset in `inputs[i1...iN]`
          for the `kth` byte in `normalized_texts[i1...iN]`. Note that
          `offsets[i1...iN, ...]` also covers the position following the last byte
          in `normalized_texts[i1...iN]`, so that we know the byte offset position
          in `input[i1...iN]` that corresponds to the end of
          `normalized_texts[i1...iN]`.
  
      """
      return self._normalize_with_offsets_helper(
          input, get_offsets=True
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensorflow.python.eager import monitoring
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.module import module
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged.ragged_tensor import RaggedTensor
  from tensorflow_text.core.pybinds import pywrap_fast_bert_normalizer_model_builder
  from tensorflow.python.framework import load_library
  from tensorflow.python.platform import resource_loader
label_desc: Use image node_id 3 for calling the FastBertNormalizer obj's underlying member method code with example usage: obj.normalize_with_offsets(input) and returns: self