Named Entity Recognition of Traditional Chinese Medicine Patents Based on BiLSTM-CRF
Algorithm 1
Input: Pre-trained character embedding
Output: Probability distribution matrix of the input sequence
(1) Step 1: The character vectors from are sent into the forward LSTM layer
(2) for ∈length () do
(3) send to BiLSTM Layer
(4) end for
(5) Step 2: The state of the cell in the current LSTM network is updated
(6)
(7)
(8)
(9)
(10)
(11)
(12) Step 3: The character vectors from are sent into the backward LSTM layer and the above 2 steps are repeated
(13) Step 4: The forward and backward sequences of hidden layers are spliced to obtain a sentence-level hidden state sequence rich in contextual information
(14) Step 5: is sent into a full connection layer and the prediction matrix is obtained