Automatic Detection of Code-Switching Patterns in Pakistan ESL Classrooms Using NLP Techniques

Authors

  • Dr. Abdul Khaliq Assistant Professor, Department of Social and Allied Sciences, Cholistan University of Veterinary and Animal Sciences, Bahawalpur, Pakistan Author
  • Muhammad Zohair BSCS scholar, Department of computer science and information technology, cholistan University of veterinary and animal sciences, Bahawalpur Author
  • Shoaib Yaseen BSCS scholar, Department of computer science and information technology, cholistan University of veterinary and animal sciences, Bahawalpur Author

DOI:

https://doi.org/10.63056/academia.5.2(a).2026.1871

Keywords:

code-switching, ESL classrooms, natural language processing, multilingual education, language detection

Abstract

This paper will look at the code-switching practices in ESL classrooms in Pakistan, and its automatic identification using Natural Language Processing (NLP) techniques. Using quantitative research design, the data were gathered on classroom discourse in selected universities in the public sector in the cities of Bahawalpur and Rahim Yar Khan. The data, which included teacher explanations, student interactions, and group discussions, were transcribed and analyzed with the help of the token-level language identification, n-gram analysis, and machine learning models. The results indicate that code-switching is common and contextual with the greatest frequency being observed in collaborative learning context. According to functional analysis, it is mostly applied in terms of description and clarification, which facilitates understanding and involvement. The statistical outcomes show that there is a significant positive correlation between code-switching and learning outcomes. Also, hybrid models developed based on NLP showed the best accuracy in detecting patterns of code switching and this underlines their reliability and applicability in education research. The research concludes that code-switching is an important pedagogical tool and that NLP is a scalable, data-driven methodology of studying multilingual classroom discourse.

Downloads

Published

2026-02-09

How to Cite

Khaliq, D. A. ., Zohair, M. ., & Yaseen, S. . (2026). Automatic Detection of Code-Switching Patterns in Pakistan ESL Classrooms Using NLP Techniques. ACADEMIA International Journal for Social Sciences, 5(2(s1), 145-156. https://doi.org/10.63056/academia.5.2(a).2026.1871