## 2 Materials and Methods
### Data Preprocessing  
Preprocessing consists of three main steps: (1) labeling accident categories, (2) word segmentation, and (3) removing stopwords. CNN can perform labeled classification tasks. Therefore, it is necessary to add a column for the accident category label to each accident text and manually label them based on the accident process and according to the accident type. Since multiple events may occur during an accident, the labeling of cases follows the principle of identifying the first occurrence of loss of control or unintentional behavior [19]. The accident process, as shown in Figure 3, describes an electrocution accident that occurred to a worker at a construction site.  
In this study, the Jieba in Python is used for word segmentation operations. Jieba can break down complete sentences into individual words, facilitating subsequent text  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Type of Accidents** & **Quantity** \\ \hline Object strikes & 221 \\ Electrocution & 201 \\ Collapse of objects & 374 \\ Falling & 771 \\ Mechanical injury & 160 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Number of accidents of various types in the accident data set.  
Figure 3: Sample of accident description and labeling.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Regions** & **Quantity** & **Regions** & **Quantity** \\ \hline Beijing & 145 & Fujian & 47 \\ Tianjin & 34 & Jiangxi & 29 \\ Shanghai & 126 & Shandong & 73 \\ Chongqing & 72 & Henan & 62 \\ Shanxi & 25 & Hubei & 92 \\ Jiangsu & 307 & Hunan & 67 \\ Zhejiang & 107 & Guangdong & 137 \\ Anhui & 153 & Sichuan & 125 \\ Guizhou & 14 & Yunnan & 26 \\ Guangxi & 73 & Shaanxi & 13 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Statistics on the number of accidents in each region of the dataset.  
processing tasks. Among the three segmentation modes provided by Jieba (precise mode, full mode, and search engine mode), the precise mode is the fastest and most suitable for practical use. It also allows for better text analysis while ensuring accuracy. Therefore, the precise mode was adopted in this study. In addition, Jieba segmentation supports the filtering and removal of words based on part-of-speech tagging. The posseg module was used in this study to obtain the corresponding part of speech for each word. After part-of-speech tagging, words can be directly deleted based on their part of speech, such as names of people or places.  
In natural language processing, stopwords refer to words that appear frequently in a text but do not carry much actual meaning. These words are often common vocabulary, such as \"in general\", \"or\", \"however\", \"most\", etc. They do not provide much information but can significantly affect the accuracy of the results. To exclude these influential stopwords as much as possible, this study uses the Harbin Institute of Technology stop-word list, Baidu stop-word list, and Sichuan University Machine Intelligence Laboratory stop-word list, consolidating and removing duplicates from all stopwords. Additionally, some domain-specific technical terms, such as \"shield tunneling machine\", are included to enhance text analysis.