Frequently occurring coal mine safety accidents have caused great casualties and economic losses. Coal mine intelligence is the core technical support for the high-quality development of the coal industry. The deep integration of coal mining safety production management and Artificial Intelligence (AI) technology is practically significant to achieve accident prevention. To efficiently identify mining accident risk factors and explore mechanism of coupling between risk factors, this study mined 400 reported cases of mining accidents in Shanxi Province and identified 64 accident risk factors through custom, stopword, synonym dictionary construction, keyword extraction and keyword correlation analysis. Then, this study constructed association rules and a Bayesian causal network. The major risk factors are identified using a comprehensive high-frequency, sensitivity, strength and key path analysis of the Bayesian causal network. The following seven risk factors are found to play a major role in the occurrence of mine accidents: inadequate safety supervision, disordered safety management, illegal organization of production, inadequate staff safety education and training, operation against rules, command against rules and weak safety consciousness among the staff. Finally, a case study is conducted to validate the reliability of the results. This study solves the problem of incomplete extraction of key feature information in coal mine reports and the lack of analyses of coupling mechanisms between coal mine risk factors in traditional accident analysis methods, providing the methodological support for the effective use of unstructured coal mine safety production data for risk analysis.