o
    qi                     @   s2   d Z ddlZddlmZ dededefddZdS )	zNER Tensorflow Model    N)CRFn_wordsn_tagsmax_lenc           
      C   s   t jjj|fdd}t jjj| d dddd|}t jjt jjjddd	d
d|}t jjd
|}t jj||}t	|}||}t jj
||}	|	S )z	Ner modelinput_layer)shapename   2   Tembedding_layer)	input_dim
output_dim	mask_zeror      relug?)unitsreturn_sequences
activationrecurrent_dropout)tfkeraslayersInput	EmbeddingBidirectionalLSTMDropoutDenser   modelsModel)
r   r   r   input_r   
lstm_layertensorcrfoutputmodel r&   M/home/ubuntu/.local/lib/python3.10/site-packages/urduhack/models/ner/model.py_bi_lstm_crf_model   s$   r(   )__doc__
tensorflowr   tf2crfr   intr(   r&   r&   r&   r'   <module>   s   