# Dynamic Railway Derailment Risk Analysis with Text-Data-Based Bayesian Network
## 3 Proposed Method: Text-Based Bayesian Network (TBN)
### Graphical Model Establishment  
Although the Swiss model is applied to represent accident causation, it is able to represent only the linear relations of barriers. However, in reality, the barriers have nonlinear relationships, which means the barriers do not necessarily function one after another. To overcome this weakness, we proposed a graphical model representing the nonlinear relations between barriers. To establish a graphical model, the identification of barrier safety is the first urgent consideration.  
First, we define the whole process of train derailment, i.e., from the travel plan to when the train stops after an accident occurs. To simplify the analysis, the process is divided into two stages, i.e., a preparation stage and an operating stage. Both stages contain several barriers to prevent a chain of failure from causing derailment. During the preparation stage, any train must undergo a series of inspections and maintenance operations by workers, drivers and so on before setting off. Thus, those inspections and maintenance operations could function as safety barriers to reduce the risk of derailment. Additionally, due to the rapid speed and high temperature that occur during the operation stage, some safety barriers play vital roles to decrease the growth of the possibility of derailment. Therefore, according to the process of a train from start to stop, six safety barriers are identified in an accident process: Initial Failure Prevention Barrier, Regular Inspection Barrier, Regular Maintenance Barrier, Process Failure Prevention Barrier, Failure Notice Barrier and Failure Control Barrier. The detailed definitions of the safety barriers and their practical meanings are as follows:  
**(1) Initial Failure Prevention Barrier**  
Initial failure means that the failure occurs in the train's preparation. In many records, if initial failures occur and are not to be observed, the failures could cause an accident to occur.  
**(2) Regular Inspection Barrier**  
Before leaving a station, a train must be inspected by workers to uncover any hidden failures. The inspections include daily inspections and regular inspections.  
**(3) Regular Maintenance Barrier**  
Once the train has been checked for failures, some measures must be taken to maintain the safe operation of the train.  
**(4) Process Failure Prevention Barrier**  
As the train starts, process failures occur while it is moving. In contrast to the initial failures, process failures come from external hazards instead of internal hazards, e.g., track damage, extreme weather and drunk drivers.  
**(5) Failure Notice Barrier**  
During the phase when the train is in motion, there are some obvious methods that can be used to find any hidden risks, e.g., the judgment of the driver, including his experience and eye vision, the use of a communication device to detect and announce risks or a plate that can show a failure, etc.  
**(6) Failure Control barrier**  
The function of this barrier is to prevent an accident when a failure is detected. If a barrier failure occurs, it means that the accident process is finished.  
Table 1 provides the definitions of the barriers. As our study focuses on text data, to further the research, we first apply the text method and then establish fault trees based on the text records. Text features include the symbol features, semantic features, term length features and keyword characteristics discussed.