(bert_hub_module_handle)
return tokenization.FullTokenizer(
      vocab_file=vocab_file, do_lower_case=do_lower_case)
Get the vocab file and casing info from the Hub module.
Get the vocab file and casing info from the Hub module.
Get the vocab file and casing info from the Hub module .
def create_tokenizer_from_hub_module(bert_hub_module_handle):
  """Get the vocab file and casing info from the Hub module."""
  with tf.Graph().as_default():
    bert_module = hub.Module(bert_hub_module_handle)
    tokenization_info = bert_module(signature="tokenization_info", as_dict=True)
    with tf.Session() as sess:
      vocab_file, do_lower_case = sess.run([tokenization_info["vocab_file"],
                                            tokenization_info["do_lower_case"]])
  return tokenization.FullTokenizer(
      vocab_file=vocab_file, do_lower_case=do_lower_case)
def create_tokenizer_from_hub_module ( bert_hub_module_handle ) : with tf . Graph ( ) . as_default ( ) : bert_module = hub . Module ( bert_hub_module_handle ) tokenization_info = bert_module ( signature = "tokenization_info" , as_dict = True ) with tf . Session ( ) as sess : vocab_file , do_lower_case = sess . run ( [ tokenization_info [ "vocab_file" ] , tokenization_info [ "do_lower_case" ] ] ) return tokenization . FullTokenizer ( vocab_file = vocab_file , do_lower_case = do_lower_case )