## 4 Results  
### Performance of the Risk Factor Identification Model  
The risk factor annotation follows the common BIO annotation strategy, where \"B-X\" indicates that the character belongs to type X and is the beginning character of an entity, \"I-X\" indicates that the character belongs to type X and is the internal character of an entity, and \"O\" indicates that the character does not belong to any type. We used Label Studio to annotate five entity categories, namely human, vehicle, road, weather and management. Since PA and SA have the same entity types and most of the entities are consistent, the data samples of PA and SA were annotated and trained together. Consistently with prior studies [40], the annotated dataset was divided into training, validation, and testing sets with an 8:1:1 ratio to ensure reliable evaluation. Noticeably, since BERT has a maximum input sequence length of 512, and the dataset in this study generally exceeded this limit, we split the paragraph set into a sentence set during the model training and optimization phases to ensure the integrity of risk factor identification for individual accident samples. During the risk factor extraction phase, the recognition results were then merged. The model development was conducted using Python 3.7. During the model training, the grid search method was chosen to find the optimal parameter settings for the models. The final hyperparameters of the model were tuned as shown in Table 2. We compared our proposed model with several mainstream NER models on our dataset. The three NER models were BiLSTM-CRF [60], BERT-BiLSTM-CRF [40], and RoBERTA-BiLSTM-CRF [61]. To ensure the credibility of the experimental results, all NER experiments were repeated five times to report the final average performance. The model performance was evaluated by _precision_, _recall_, and \(f1_{score}\), defined as follows [36]:  
\[precision=\frac{TP}{TP+FP} \tag{14}\]  
\[recall=\frac{TP}{TP+FN} \tag{15}\]  
\[f1_{score}=2\cdot\frac{precision\cdot recall}{precision+recall} \tag{16}\]  
where \(TP\), \(FP\), and \(FN\) represent the true positive, false positive, and false negative rates of the prediction results, respectively. A risk factor was considered \(TP\) only when its start position, end position, and type were all accurately recognized. Furthermore, we also calculated the micro average _micro avg_, macro average _macro avg_, and weighted average _weighted avg_ to assess the test results of the model according to Equations (17)-(19) [36]. \[micro\ avg=\left\{ \begin{array}{l}micro\ {precision}=(\sum_{i=1}^{n}TP_{i})/( \sum_{i=1}^{n}TP_{i}+\sum_{i=1}^{n}FP_{i})\\ micro\ {recall}=(\sum_{i=1}^{n}TP_{i})/(\sum_{i=1}^{n}TP_{i}+\sum_{i=1}^{n}FN_{i})\\ micro\ {f1_{score}}=2\cdot\frac{micro\ {precision}\ {micro\ {recall}}}{micro\ { precision}+micro\ {recall}}\\ \end{array} \right. \tag{17}\]  
\[macro\ avg=\frac{\sum_{i=1}^{n}indicator}{n} \tag{18}\]  
\[weighted\ avg=\frac{\sum_{i=1}^{n}indicator_{i}\times support_{i}}{\sum_{i=1}^ {n}support_{i}} \tag{19}\]  
where \(n\) is the number of entity categories, \(indicator=\{precision,recall,f1_{score}\}\), and \(support\) is the number of entities in the corresponding entity category. Table 3 presents the macro average results for five entities across four models. The results showed that our proposed TRBERT-BiLSTM-CRF model achieved the best performance. By introducing the pretrained language model, there was a significant improvement in performance, with the macro-F1 score increasing by approximately 10% compared with the model that was not pretrained on a specific corpus. This highlights the effectiveness of incorporating a domain-specific corpus for the NER task. We also tested the performance of the TRBERT-BiLSTM-CRF model on different entities, as shown in Table 4. It is worth noting that the precision and recall rates for the ROAD