class_docstr: Tokenizes a tensor of UTF-8 strings on whitespaces.
class_docstr_tok: ["Tokenizes","a","tensor","of","UTF-8","strings","on","whitespaces","."]
docstr: Tokenizes a tensor of UTF-8 strings on whitespaces.
  
  The strings are split on ICU defined whitespace characters. These
  whitespace characters are dropped.
  
  Example:
  
  >>> splitter = WhitespaceTokenizer()
  >>> pieces, starts, ends = splitter.tokenize_with_offsets("a bb ccc")
  >>> print(pieces.numpy(), starts.numpy(), ends.numpy())
  [b'a' b'bb' b'ccc'] [0 2 5] [1 4 8]
  
  Args:
    input: A `RaggedTensor`or `Tensor` of UTF-8 strings with any shape.
  
  Returns:
    A tuple `(tokens, start_offsets, end_offsets)` where:
  
      * `tokens`: A `RaggedTensor` of tokenized text.
      * `start_offsets`: A `RaggedTensor` of the tokens' starting byte offset.
      * `end_offsets`: A `RaggedTensor` of the tokens' ending byte offset.
docstr_tok: ["Tokenizes","a","tensor","of","UTF-8","strings","on","whitespaces",".","The","strings","are","split","on","ICU","defined","whitespace","characters",".","These","whitespace","characters","are","dropped",".","Example",":",">",">",">","splitter","=","WhitespaceTokenizer","(",")",">",">",">","pieces",",","starts",",","ends","=","splitter.tokenize_with_offsets","(","``","a","bb","ccc","''",")",">",">",">","print","(","pieces.numpy","(",")",",","starts.numpy","(",")",",","ends.numpy","(",")",")","[","b","'","a","'","b'bb","'","b'ccc","'","]","[","0","2","5","]","[","1","4","8","]","Args",":","input",":","A","`","RaggedTensor","`","or","`","Tensor","`","of","UTF-8","strings","with","any","shape",".","Returns",":","A","tuple","`","(","tokens",",","start_offsets",",","end_offsets",")","`","where",":","*","`","tokens","`",":","A","`","RaggedTensor","`","of","tokenized","text",".","*","`","start_offsets","`",":","A","`","RaggedTensor","`","of","the","tokens","'","starting","byte","offset",".","*","`","end_offsets","`",":","A","`","RaggedTensor","`","of","the","tokens","'","ending","byte","offset","."]
code: def tokenize_with_offsets(
      self, input
  ):  # pylint: disable=redefined-builtin
      """Tokenizes a tensor of UTF-8 strings on whitespaces.
  
      The strings are split on ICU defined whitespace characters. These
      whitespace characters are dropped.
  
      Example:
  
      >>> splitter = WhitespaceTokenizer()
      >>> pieces, starts, ends = splitter.tokenize_with_offsets("a bb ccc")
      >>> print(pieces.numpy(), starts.numpy(), ends.numpy())
      [b'a' b'bb' b'ccc'] [0 2 5] [1 4 8]
  
      Args:
        input: A `RaggedTensor`or `Tensor` of UTF-8 strings with any shape.
  
      Returns:
        A tuple `(tokens, start_offsets, end_offsets)` where:
  
          * `tokens`: A `RaggedTensor` of tokenized text.
          * `start_offsets`: A `RaggedTensor` of the tokens' starting byte offset.
          * `end_offsets`: A `RaggedTensor` of the tokens' ending byte offset.
      """
      name = None
      with ops.name_scope(name, "WhitespaceTokenize", [input]):
          input_tensor = (
              ragged_tensor.convert_to_tensor_or_ragged_tensor(input)
          )
          if input_tensor.shape.ndims is None:
              raise ValueError(
                  "Rank of input_tensor must be statically known."
              )
          if ragged_tensor.is_ragged(input_tensor):
              if input_tensor.flat_values.shape.ndims > 1:
                  # If the flat_values of our ragged tensor is multi-dimensional, we can
                  # process it separately and our output will have the same nested
                  # splits as our input.
                  (tokens, starts, ends) = self.tokenize_with_offsets(
                      input_tensor.flat_values
                  )
                  return (
                      input_tensor.with_flat_values(tokens),
                      input_tensor.with_flat_values(starts),
                      input_tensor.with_flat_values(ends),
                  )
              else:
                  # Recursively process the values of the ragged tensor.
                  (tokens, starts, ends) = self.tokenize_with_offsets(
                      input_tensor.values
                  )
                  return (
                      input_tensor.with_values(tokens),
                      input_tensor.with_values(starts),
                      input_tensor.with_values(ends),
                  )
          else:
              if input_tensor.shape.ndims > 1:
                  # Convert the input tensor to ragged and process it.
                  return self.tokenize_with_offsets(
                      ragged_conversion_ops.from_tensor(input_tensor)
                  )
              elif input_tensor.shape.ndims == 0:
                  (tokens, starts, ends) = self.tokenize_with_offsets(
                      array_ops_stack.stack([input_tensor])
                  )
                  return tokens.values, starts.values, ends.values
              else:
                  # Our rank 1 tensor is the correct shape, so we can process it as
                  # normal.
                  return self._whitespace_tokenize_with_offsets(
                      input_tensor
                  )
  
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 ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops.ragged import ragged_conversion_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged.ragged_tensor import RaggedTensor
  from tensorflow_text.core.pybinds import pywrap_whitespace_tokenizer_config_builder
  from tensorflow_text.python.ops.tokenization import TokenizerWithOffsets
  from tensorflow.python.framework import load_library
  from tensorflow.python.platform import resource_loader
  from tensorflow.python.framework import load_library
  from tensorflow.python.platform import resource_loader
label_desc: Use image node_id 3 for calling the WhitespaceTokenizer obj's underlying member method code with example usage: obj.tokenize_with_offsets(input) and returns: input_tensor,  input_tensor,  input_tensor, input_tensor,  input_tensor,  input_tensor, self, tokens,  starts,  ends, self