# KGNER: Improving Chinese Named Entity Recognition by BERT Infused with the Knowledge Graph
## 5 Overall Results
### Efficiency Comparison  
As shown in Figure 6, we compared the inference speed of the three models on four datasets. As we can see, on different datasets, the inference time becomes longer as the dataset size increases, in addition to Ontonotes dataset. Using the same data, the inference time of both KBERT and KGNER increases due to the introduction of external knowledge. This may be the reason that the introduced knowledge leads to an increase in the sentence length. Compared with KBERT, except for the Ontonotes dataset, our model inference is a little slower. We infer that this may suffer from the impact of the CRF.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Knowledge Graph Type** & **Weibo** & **Ontonotes** & **MSRA** & **Resume** & **Medicine_NER** \\ \hline HowNet & 70.4 & 82.6 & 95.9 & 96.2 & 93.8 \\ CN-DBpedia & 71.9 & 82.1 & 95.7 & 96.4 & 93.8 \\ MedicalKG & 68.7 & 82.1 & 95.9 & 96.2 & 94.1 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Comparison of different knowledge graphs (\(F1\)).  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Sentence Length** & **Sentence Number** & **Matched Number** & **Proportion (\%)** & **KGNER/BERT (F1)** \\ \hline
1 \(<\) 20 & 1685 & 153 & 9.0 & 77.5/73.0 \\
20 \(\leq\) 1 \(<\) 40 & 1302 & 413 & 31.7 & 81.2/75.9 \\
40 \(\leq\) 1 \(<\) 60 & 798 & 360 & 45.1 & 82.7/75.9 \\
60 \(\leq\) 1 \(<\) 80 & 365 & 232 & 63.5 & 84.3/77.5 \\
80 \(\leq\) 1 \(<\) 100 & 169 & 103 & 60.9 & 80.0/73.9 \\
100 \(\leq\) 1 & 124 & 92 & 74.1 & 82.6/77.7 \\ \hline \hline \end{tabular}
\end{table}
Table 5: \(F1\) score against sentence length on the OntoNotes dateset.  
knowledge into NER is a promising endeavor. We will continue to explore the potential of KGNER on other NLP tasks as future work.  
Conceptualization, W.H. and L.H.; methodology, W.H.; formal analysis, H.M.; investigation, H.M.; resources, K.W.; data curation, J.X.; writing--original draft preparation, W.H.; writing--review and editing, L.H.; All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
Not applicable.  
The Weibo, Resume, MSRA and Ontonotes datasets are publicly available at: [[https://github.com/liuwei1206/LEBERT](https://github.com/liuwei1206/LEBERT)]([https://github.com/liuwei1206/LEBERT](https://github.com/liuwei1206/LEBERT)). The HowNet, CN-DBpedia, MedicaKG, and Medicine_NER are publicly available at: [[https://github.com/autoliuweijie/K-BERT](https://github.com/autoliuweijie/K-BERT)]([https://github.com/autoliuweijie/K-BERT](https://github.com/autoliuweijie/K-BERT)).  
We sincerely appreciate the anonymous reviewers for their precious comments and valuable suggestions. Moreover, we genuinely thank my teacher for his constructive guidance for the period of production of this paper and my friends [PERSON] and [PERSON] for their help polishing our paper.  
The authors declare no conflict of interest.  
The following abbreviations are used in this manuscript:  
\begin{tabular}{l l} NER & Named entity recognition \\ BERT & Bidirectional Encoder Representation Transformers \\ CRF & Conditional random field \\ NLP & Natural language procession \\ Q&A & Question and answer \\ ELMO & Embeddings from Language Models \\ KG & Knowledge graphs \\ KN & Knowledge noise \\ HF & Heterogeneous information fusion \\ LSTM & Long Short-Term Memory \\ RNN & Recurrent neural network \\ PTMs & Pre-Trained Models \\ GPT & Generative Pre-Training \\ BART & Bidirectional and Auto-Regressive Transformers \\ KB & Knowledge base \\ GRU & Gated recurrent unit \\ KGE & Knowledge graph embedding \\ KL & Knowledge layer \\ \end{tabular}