class_docstr: Tokenizer that uses a Hub module.
  
  This class is just a wrapper around an internal HubModuleSplitter.  It offers
  the same functionality, but with 'token'-based method names: e.g., one can use
  tokenize() instead of the more general and less informatively named split().
  
  Example:
  
  >>> HUB_MODULE = "https://tfhub.dev/google/zh_segmentation/1"
  >>> segmenter = HubModuleTokenizer(HUB_MODULE)
  >>> segmenter.tokenize(["新华社北京"])
  <tf.RaggedTensor [[b'\xe6\x96\xb0\xe5\x8d\x8e\xe7\xa4\xbe',
                     b'\xe5\x8c\x97\xe4\xba\xac']]>
  
  You can also use this tokenizer to return the split strings and their offsets:
  
  >>> HUB_MODULE = "https://tfhub.dev/google/zh_segmentation/1"
  >>> segmenter = HubModuleTokenizer(HUB_MODULE)
  >>> pieces, starts, ends = segmenter.tokenize_with_offsets(["新华社北京"])
  >>> print("pieces: %s starts: %s ends: %s" % (pieces, starts, ends))
  pieces: <tf.RaggedTensor [[b'\xe6\x96\xb0\xe5\x8d\x8e\xe7\xa4\xbe',
                             b'\xe5\x8c\x97\xe4\xba\xac']]>
  starts: <tf.RaggedTensor [[0, 9]]>
  ends: <tf.RaggedTensor [[9, 15]]>
docstr: Tokenizes a tensor of UTF-8 strings into words with [start,end) offsets.
  
  Args:
    input_strs: An N-dimensional `Tensor` or `RaggedTensor` of UTF-8 strings.
  
  Returns:
    A tuple `(tokens, start_offsets, end_offsets)` where:
      * `tokens` is a `RaggedTensor` of strings where `tokens[i1...iN, j]` is
        the string content of the `j-th` token in `input_strs[i1...iN]`
      * `start_offsets` is a `RaggedTensor` of int64s where
        `start_offsets[i1...iN, j]` is the byte offset for the start of the
        `j-th` token in `input_strs[i1...iN]`.
      * `end_offsets` is a `RaggedTensor` of int64s where
        `end_offsets[i1...iN, j]` is the byte offset immediately after the
        end of the `j-th` token in `input_strs[i...iN]`.
docstr_tok: ["Tokenizes","a","tensor","of","UTF-8","strings","into","words","with","[","start",",","end",")","offsets",".","Args",":","input_strs",":","An","N-dimensional","`","Tensor","`","or","`","RaggedTensor","`","of","UTF-8","strings",".","Returns",":","A","tuple","`","(","tokens",",","start_offsets",",","end_offsets",")","`","where",":","*","`","tokens","`","is","a","`","RaggedTensor","`","of","strings","where","`","tokens","[","i1","...","iN",",","j","]","`","is","the","string","content","of","the","`","j-th","`","token","in","`","input_strs","[","i1","...","iN","]","`","*","`","start_offsets","`","is","a","`","RaggedTensor","`","of","int64s","where","`","start_offsets","[","i1","...","iN",",","j","]","`","is","the","byte","offset","for","the","start","of","the","`","j-th","`","token","in","`","input_strs","[","i1","...","iN","]","`",".","*","`","end_offsets","`","is","a","`","RaggedTensor","`","of","int64s","where","`","end_offsets","[","i1","...","iN",",","j","]","`","is","the","byte","offset","immediately","after","the","end","of","the","`","j-th","`","token","in","`","input_strs","[","i","...","iN","]","`","."]
code: def tokenize_with_offsets(self, input_strs):
      """Tokenizes a tensor of UTF-8 strings into words with [start,end) offsets.
  
      Args:
        input_strs: An N-dimensional `Tensor` or `RaggedTensor` of UTF-8 strings.
  
      Returns:
        A tuple `(tokens, start_offsets, end_offsets)` where:
          * `tokens` is a `RaggedTensor` of strings where `tokens[i1...iN, j]` is
            the string content of the `j-th` token in `input_strs[i1...iN]`
          * `start_offsets` is a `RaggedTensor` of int64s where
            `start_offsets[i1...iN, j]` is the byte offset for the start of the
            `j-th` token in `input_strs[i1...iN]`.
          * `end_offsets` is a `RaggedTensor` of int64s where
            `end_offsets[i1...iN, j]` is the byte offset immediately after the
            end of the `j-th` token in `input_strs[i...iN]`.
      """
      return self._splitter.split_with_offsets(input_strs)
  
imports: from tensorflow.python.eager import monitoring
  from tensorflow_text.python.ops import hub_module_splitter
  from tensorflow_text.python.ops.tokenization import TokenizerWithOffsets
label_desc: Use image node_id 2 for calling the HubModuleTokenizer obj's underlying member method code with example usage: obj.tokenize_with_offsets(input_strs) and returns: self