class_docstr: A Keras implementation of BiLSTM-CRF for sequence labeling.
  
  References
  --
  Guillaume Lample, Miguel Ballesteros, Sandeep Subramanian, Kazuya Kawakami, Chris Dyer.
  "Neural Architectures for Named Entity Recognition". Proceedings of NAACL 2016.
  https://arxiv.org/abs/1603.01360
docstr: Build a Bi-LSTM CRF model.
  
  Args:
      word_vocab_size (int): word vocabulary size.
      char_vocab_size (int): character vocabulary size.
      num_labels (int): number of entity labels.
      word_embedding_dim (int): word embedding dimensions.
      char_embedding_dim (int): character embedding dimensions.
      word_lstm_size (int): character LSTM feature extractor output dimensions.
      char_lstm_size (int): word tagger LSTM output dimensions.
      fc_dim (int): output fully-connected layer size.
      dropout (float): dropout rate.
      embeddings (numpy array): word embedding matrix.
      use_char (boolean): add char feature.
      use_crf (boolean): use crf as last layer.
      char_mask_zero(boolean): mask zero for character embedding (see TF2 isse #33148 and #33069)
      use_elmo(boolean): If True, model will be configured to accept Elmo embeddings
                         as an additional input to word and character embeddings
      use_transformer_with_dim(int): If not None, model will be configured to accept
                                     transformer embeddings of given dimension
docstr_tok: ["Build","a","Bi-LSTM","CRF","model",".","Args",":","word_vocab_size","(","int",")",":","word","vocabulary","size",".","char_vocab_size","(","int",")",":","character","vocabulary","size",".","num_labels","(","int",")",":","number","of","entity","labels",".","word_embedding_dim","(","int",")",":","word","embedding","dimensions",".","char_embedding_dim","(","int",")",":","character","embedding","dimensions",".","word_lstm_size","(","int",")",":","character","LSTM","feature","extractor","output","dimensions",".","char_lstm_size","(","int",")",":","word","tagger","LSTM","output","dimensions",".","fc_dim","(","int",")",":","output","fully-connected","layer","size",".","dropout","(","float",")",":","dropout","rate",".","embeddings","(","numpy","array",")",":","word","embedding","matrix",".","use_char","(","boolean",")",":","add","char","feature",".","use_crf","(","boolean",")",":","use","crf","as","last","layer",".","char_mask_zero","(","boolean",")",":","mask","zero","for","character","embedding","(","see","TF2","isse","#","33148","and","#","33069",")","use_elmo","(","boolean",")",":","If","True",",","model","will","be","configured","to","accept","Elmo","embeddings","as","an","additional","input","to","word","and","character","embeddings","use_transformer_with_dim","(","int",")",":","If","not","None",",","model","will","be","configured","to","accept","transformer","embeddings","of","given","dimension"]
code: def __init__(
      self,
      num_labels,
      word_vocab_size,
      char_vocab_size=None,
      word_embedding_dim=100,
      char_embedding_dim=25,
      word_lstm_size=100,
      char_lstm_size=25,
      fc_dim=100,
      dropout=0.5,
      embeddings=None,
      use_char=True,
      use_crf=True,
      char_mask_zero=True,
      use_elmo=False,
      use_transformer_with_dim=None,
  ):
      """Build a Bi-LSTM CRF model.
  
      Args:
          word_vocab_size (int): word vocabulary size.
          char_vocab_size (int): character vocabulary size.
          num_labels (int): number of entity labels.
          word_embedding_dim (int): word embedding dimensions.
          char_embedding_dim (int): character embedding dimensions.
          word_lstm_size (int): character LSTM feature extractor output dimensions.
          char_lstm_size (int): word tagger LSTM output dimensions.
          fc_dim (int): output fully-connected layer size.
          dropout (float): dropout rate.
          embeddings (numpy array): word embedding matrix.
          use_char (boolean): add char feature.
          use_crf (boolean): use crf as last layer.
          char_mask_zero(boolean): mask zero for character embedding (see TF2 isse #33148 and #33069)
          use_elmo(boolean): If True, model will be configured to accept Elmo embeddings
                             as an additional input to word and character embeddings
          use_transformer_with_dim(int): If not None, model will be configured to accept
                                         transformer embeddings of given dimension
      """
      super(BiLSTMCRF).__init__()
      self._char_embedding_dim = char_embedding_dim
      self._word_embedding_dim = word_embedding_dim
      self._char_lstm_size = char_lstm_size
      self._word_lstm_size = word_lstm_size
      self._char_vocab_size = char_vocab_size
      self._word_vocab_size = word_vocab_size
      self._fc_dim = fc_dim
      self._dropout = dropout
      self._use_char = use_char
      self._use_crf = use_crf
      self._embeddings = embeddings
      self._num_labels = num_labels
      self._char_mask_zero = char_mask_zero
      self._use_elmo = use_elmo
      self._use_transformer_with_dim = use_transformer_with_dim
  
file_path: ktrain/ktrain/text/ner/anago/models.py
imports: from ....None import utils
  from ....imports import *
label_desc: Use image node_id 1 to create a new BiLSTMCRF object from inherited base classes: object with example: obj = BiLSTMCRF(num_labels, word_vocab_size, char_vocab_size, word_embedding_dim, char_embedding_dim, word_lstm_size, char_lstm_size, fc_dim, dropout, embeddings, use_char, use_crf, char_mask_zero, use_elmo, use_transformer_with_dim)