class_docstr: TransformerEmbedding is based on bert4keras.
  The embeddings itself are wrapped into our simple embedding interface so that they can be used like any other embedding.
class_docstr_tok: ["TransformerEmbedding","is","based","on","bert4keras",".","The","embeddings","itself","are","wrapped","into","our","simple","embedding","interface","so","that","they","can","be","used","like","any","other","embedding","."]
docstr: Args:
      vocab_path: vocab file path, example `vocab.txt`
      config_path: model config path, example `config.json`
      checkpoint_path: model weight path, example `model.ckpt-100000`
      model_type: transfer model type, {bert, albert, nezha, gpt2_ml, t5}
      kwargs: additional params
docstr_tok: ["Args",":","vocab_path",":","vocab","file","path",",","example","`","vocab.txt","`","config_path",":","model","config","path",",","example","`","config.json","`","checkpoint_path",":","model","weight","path",",","example","`","model.ckpt-100000","`","model_type",":","transfer","model","type",",","{","bert",",","albert",",","nezha",",","gpt2_ml",",","t5","}","kwargs",":","additional","params"]
code: def __init__(
      self,
      vocab_path: str,
      config_path: str,
      checkpoint_path: str,
      model_type: str = "bert",
      **kwargs: Any,
  ):
      """
  
      Args:
          vocab_path: vocab file path, example `vocab.txt`
          config_path: model config path, example `config.json`
          checkpoint_path: model weight path, example `model.ckpt-100000`
          model_type: transfer model type, {bert, albert, nezha, gpt2_ml, t5}
          kwargs: additional params
      """
      self.vocab_path = vocab_path
      self.config_path = config_path
      self.checkpoint_path = checkpoint_path
      self.model_type = model_type
      self.vocab_list: List[str] = []
      kwargs["segment"] = True
      super(TransformerEmbedding, self).__init__(**kwargs)
  
file_path: Kashgari/kashgari/embeddings/transformer_embedding.py
imports: import codecs
  import json
  from typing import Dict, List, Any, Optional
  from bert4keras.models import build_transformer_model
  from kashgari.embeddings.abc_embedding import ABCEmbedding
  from kashgari.logger import logger
label_desc: Use image node_id 2 to create a new TransformerEmbedding object from inherited base classes: ABCEmbedding with example: obj = TransformerEmbedding(vocab_path, config_path, checkpoint_path, model_type)