# Extracting Domain-Specific Chinese Named Entities for Aviation Safety Reports: A Case Study
## 3 Methods
### Encoding Layer
#### 3.2.1 BiGRU  
The RNN is a type of neural network that processes sequential data. However, there are problems of gradient explosion and gradient disappearance when processing long sequences. By introducing the gate mechanism and memory cells to store long-range dependencies, LSTM can solve the problem of gradient explosion and gradient disappearance. There are three gate mechanisms: the forget gate, input gate and output gate. The input gate determines what information should be input, the forget gate controls what information should be forgotten, and the output gate controls what information should be output. This improves the model's ability to handle long-range dependencies. BiLSTM is a form of bidirectional LSTM. LSTM can only capture directional context information, and it cannot use the following contextual information. LSTM can only rely on the previous information, which makes the extracted features have certain limitations. By capturing front-to-back and back-to-front contextual dependencies, BiLSTM can fully obtain more comprehensive features. GRU and LSTM can achieve similar effects, but in comparison, GRU training consumes less. BiGRU contains two gating units: the update gate and the reset gate. Compared to BiLSTM's three gating units, BiGRU has fewer parameters and a faster computation speed. In addition, like BiLSTM, BiGRU can also transfer information in both directions and obtain comprehensive features.  
The structure of the GRU is shown in Figure 4. \(x_{t}\) denotes the input at moment t, and \(h_{t}\) denotes the input of the hidden state at moment t. The GRU network forward propagation weight parameter update formula is  
\[zt=\sigma(wxz\cdot xt+whz\cdot ht-1+bz) \tag{1}\]  
\[rt=\sigma(wxr\cdot xt+whr\cdot ht-1+br) \tag{2}\]  
\[\widetilde{ht}=\tanh(wxh\cdot xt+rt\otimes whh\cdot ht-1) \tag{3}\]  
\[ht=zt\otimes ht-1+(1-zt)\otimes\widetilde{ht} \tag{4}\]  
where \(\widetilde{ht}\) donates the candidate hidden state, \(h_{t}\) donates the hidden state which is the output of the GRU unit, \(r_{t}\) is a reset gate for controlling whether or not the current content is remembered, \(z_{t}\) is an update gate for controlling the proportion of preorder memory and candidate memory in the current state, \(+\) denotes vector splicing, \(\otimes\) denotes a multiplication by the corresponding elements, \(\sigma\) denotes a sigmoid function, \(w\) is the weighting factor, and \(b\) is the offset term.  
Figure 4: Structure of GRU.  
The fusion vector CDW = {cdw\({}_{1}\), cdw\({}_{2}\),..., cdw\({}_{n}\)} is the input. We obtain Ht = {ht\({}_{1}\), ht\({}_{2}\),..., ht\({}_{n}\)} through the forward direction. We obtain Ht = {H't\({}_{1}\), H't\({}_{2}\),..., H't\({}_{n}\)} through the backward direction. The functions of splicing two directions result in H = {ht;H't}.  
Aviation entities in aviation safety events are long and complex in composition, and there is the phenomenon of nested entities. BiGRU effectively captures contextual information in text through its bidirectional characteristics and GRU's update mechanism. BiGRU is introduced to obtain the contextual features of a text to solve the recognition error problem caused by long entity names. Two one-way GRUs are combined together to form BiGRU to obtain the forward and reverse information to fully extract the contextual features of aviation safety events.