Automatic Detection of Code-Switching Patterns in Pakistan ESL Classrooms Using NLP Techniques
DOI:
https://doi.org/10.63056/academia.5.2(a).2026.1871Keywords:
code-switching, ESL classrooms, natural language processing, multilingual education, language detectionAbstract
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
Issue
Section
License
Copyright (c) 2026 Dr. Abdul Khaliq, Muhammad Zohair, Shoaib Yaseen (Author)

This work is licensed under a Creative Commons Attribution 4.0 International License.







