For the association problems in the path of reforming the Civic Politics of yoga courses in colleges and universities, this paper takes the relevant elements between yoga and Civic Politics as the entry point. The text analysis method is used to mine the core elements of yoga courses and Civic and political courses. Aiming at the limitation of TF-IDF model in the accuracy of keyword extraction, the G1 assignment method is used to integrate the multidimensional features of keywords. Based on the different attributes of the words, the corresponding weights are assigned to rank the importance of the words in a more scientific way, and the comprehensive weights of the words are calculated accordingly. As a result, the keyword extraction algorithm SLPL-TF-IDF is proposed based on multiple features of words and semantic information extraction based on the Longformer pre-trained language model, and then the improved Apriori algorithm is introduced to mine and output the association rules between yoga courses and the knowledge of Civics and Politics, which provides effective technical support for the construction and optimization of the path of Civics and Politics reform of yoga courses in colleges and universities. In the experimental reform of yoga courses’ ideology and politics in K colleges and universities, it is found that the subject word “yoga philosophy” has the highest correlation with other high-frequency subject words, which are all up to 0.90 and above. The theme of “Yoga Philosophy” should be used as an important bridge for the construction and optimization of the path of political reform of yoga courses in colleges and universities.