class*args, **kwargs)[source]

The NerNetwork is for Neural Named Entity Recognition and Slot Filling.

  • n_tags – Number of tags in the tag vocabulary.

  • token_emb_dim – Dimensionality of token embeddings, needed if embedding matrix is not provided.

  • char_emb_dim – Dimensionality of token embeddings.

  • capitalization_dim – Dimensionality of capitalization features, if they are provided.

  • pos_features_dim – Dimensionality of POS features, if they are provided.

  • additional_features – Some other features.

  • net_type – Type of the network, either 'rnn' or 'cnn'.

  • cell_type – Type of the cell in RNN, either 'lstm' or 'gru'.

  • use_cudnn_rnn – Whether to use CUDNN implementation of RNN.

  • two_dense_on_top – Additional dense layer before predictions.

  • n_hidden_list – A list of output feature dimensionality for each layer. A value (100, 200) means that there will be two layers with 100 and 200 units, respectively.

  • cnn_filter_width – The width of the convolutional kernel for Convolutional Neural Networks.

  • use_crf – Whether to use Conditional Random Fields on top of the network (recommended).

  • token_emb_mat – Token embeddings matrix.

  • char_emb_mat – Character embeddings matrix.

  • use_batch_norm – Whether to use Batch Normalization or not. Affects only CNN networks.

  • dropout_keep_prob – Probability of keeping the hidden state, values from 0 to 1. 0.5 works well in most cases.

  • embeddings_dropout – Whether to use dropout on embeddings or not.

  • top_dropout – Whether to use dropout on output units of the network or not.

  • intra_layer_dropout – Whether to use dropout between layers or not.

  • l2_reg – L2 norm regularization for all kernels.

  • gpu – Number of gpu to use.

  • seed – Random seed.