A Survey of Code-switching: Linguistic and Social Perspectives for Language Technologies (2021)

Abstract: The analysis of data in which multiple languages are represented has gained popularity among computational linguists in recent years. So far, much of this research focuses mainly on the improvement of computational methods and largely ignores linguistic and social aspects of C-S discussed across a wide range of languages within the long-established literature in linguistics. To fill this gap, we offer a survey of code-switching (C-S) covering the literature in linguistics with a reflection on the key issues in language technologies. From the linguistic perspective, we provide an overview of structural and functional patterns of C-S focusing on the literature from European and Indian contexts as highly multilingual areas. From the language technologies perspective, we discuss how massive language models fail to represent diverse C-S types due to lack of appropriate training data, lack of robust evaluation benchmarks for C-S (across multilingual situations and types of C-S) and lack of end-to- end systems that cover sociolinguistic aspects of C-S as well. Our survey will be a step to- wards an outcome of mutual benefit for computational scientists and linguists with a shared interest in multilingualism and C-S.

## introduction it is common for individuals in multilingual communities to switch between languages in various ways, in speech and in writing. in example 1, a bilingual child alternates between german and turkish (in bold) to describe her teacher at school. note that the turkish possessive case marker (-si) is attached to a german noun @xcite . ms. kummer. real name-poss.3sg christa. 'ms. kummer. (her) real name is christa' the goal of this paper is to inform researchers in computational linguistics (cl) and language technologies about the linguistic and social aspects of code-switching (c-s) found in multilingual contexts (e.g. europe and india) and how linguists describe and model them. our intent is to increase clarity and depth in computational investigations of c-s and to bridge the fields so that they might be mutually reinforcing. it is our hope that interested readers can profit from the insights provided by the studies reported in this survey, for instance, in understanding the factors that guide c-s outcomes or in making use of existing annotation schema across multilingual contexts. ## competing models of c-s for linguists, the specific ways in which languages are switched matters. the use of a single spanish word in an english tweet (ex. 2) is not as syntactically complicated as the integration in ex. 1. in fact, it may not signal multilingualism at all, simply borrowing. many words, particularly anglicisms, circulate globally: marketing, feedback, gay. although it dominates computational approaches to c-s, the mlf is contested on empirical and theoretical grounds. the consistent identification of a matrix language is not always possible, the criteria for defining it are ambiguous, and its scope is limited @xcite @xcite @xcite . @xcite computationally show that different ways of determining the matrix language only reliably converge over sentences with simple insertions as in example (2). for many linguists, the mlf is not the only way, or even an adequate way, to theorize c-s. the equivalence constraint @xcite ) captures the fact that c-s tends to occur at points where the linear structures of the contributing languages coincide, as when the languages involved share word order. other syntactic theories are built on the differences between lexical and functional elements, including the government constraint @xcite and the functional head constraint @xcite . incorporating the latter in nlp experiments has been shown to improve the accuracy of computational and speech models @xcite . functional elements include negative particles and auxiliaries, which are respectively classified as adverbs and verbs (lexical classes), in some nlp tag sets @xcite . this means that nlp experiments often use annotations that are too coarse to be linguistically informative with regard to c-s. constraint-free theories @xcite hold that nothing restricts switching apart from the grammatical requirements of the contributing languages. testing such theories in nlp experiments would require syntactically parsed corpora that are rare for mixed language data @xcite . in sum, working together, theoretical and computational linguists could create better tools for processing c-s than those currently available. ## why do speakers code-switch? in addition to focusing on the linguistic aspects and constraints on c-s, linguists are also interested in the social and cognitive motivations for switching across languages. what a (multilingual) speaker is trying to achieve by switching languages can affect its structural outcome. linguists recognize that pragmatic, interactional, and socio-indexical functions may condition c-s patterns. for instance, @xcite demonstrate that czech-english speakers switch to english for highinformation content words in prominent prosodic positions when speaking czech. other uses of c-s with structural traces include signalling an in-group identity through backflagging @xcite or emblematic tag-switching @xcite . these are words or phrases that are used at the edge of clauses (e.g., spanish ojalá or english so). other functions, among these, quoting a speaker, getting the attention of an interlocutor, or reiterating an utterance to soften or intensify a message will also be indicated via c-s in predictable linguistic constructions, such as with verbs of 'saying', vocative expressions, and sequential translation equivalents @xcite . according to @xcite , there are eight factors (e.g. topic, type of interaction, interlocutors, role relationship, communication channel) that can influence c-s choices. @xcite explains c-s choices in line with politeness theory, focusing on prestige and face-saving moves in multilingual conversations. @xcite takes a macro-social view, arguing that french-english c-s in quebec may signal a political choice among both dominant and subordinate groups. @xcite suggest that social factors influence language choice, with different generations of speakers from the same community exhibiting very different c-s patterns. similarly @xcite argues that as speakers cognitively construct equivalence between morphemes, words, and phrases across their languages, communities of the same languages may do this differently. evidence from computational studies suggests that c-s is speaker-dependent @xcite . gender and identity also play a role for c-s practices in english and greek cypriot community in london @xcite . from a computational perspective, @xcite investigated the factors that influence c-s choices (turkish-dutch) in computer mediated interaction and how to predict them automatically. ## c-s across languages: european context the contexts in which people acquire and use multiple languages in europe are diverse. some acquire their languages simultaneously from birth, while others acquire them sequentially, either naturally or via explicit instruction. multilingualism is the norm in many zones where local residents may speak different languages to accommodate their interlocutors. speakers who use local dialects or minoritized varieties may also be engaged in c-s when switching between their variety and a dominant one @xcite . c-s in bilingual language acquisition of children has been studied across language contact contexts in europe. in germany, @xcite and @xcite focused on turkish-german c-s and @xcite on german-french c-s of bilingual children. from a comparative perspective, @xcite analyzed c-s among bilingual, trilingual, and multilingual children growing up in spain and germany. in the netherlands, @xcite focused on c-s among bilingual frisian-dutch children. in addition to analyzing c-s in children's speech, @xcite and lanza (1998) investigated c-s in the interaction patterns between bilingual children and their parents (i.e. spanish-catalan and english-norwegian respectively). within an educational setting, kleeman (2012) observed c-s among bilingual (north sami-norwegian) kindergarten children in the north of norway. similarly, jørgensen (1998) and @xcite report the use of c-s for resolving disputes among bilingual (turkish-danish) children in denmark and multilingual (swedish-english and/or a non-scandinavian language) children in sweden respectively. c-s does not only take place between standard languages but between minority languages and dialects as well. for example, @xcite @xcite focused on the c-s between welsh and english in the uk. @xcite reports cases of language mixing between standard italian and italoromance dialects in italy. in the balkans, @xcite analyzed c-s between turkish-bulgarian and romani in bulgaria. c-s between dialects and/or standard vs. minority languages in computer mediated interaction was analyzed by @xcite among swiss-german dialects and by @xcite through sms corpora collected across germanic (i.e. english and german) and romance languages (french, spanish, italian) in switzerland. c-s is commonly observable across immigrant contexts in europe. in the uk, @xcite described the c-s patterns between english and cypriot greek while @xcite focused on the c-s between english and cypriot turkish communities in london. @xcite analyzed the c-s between english and chinese from a conversational analysis point of view based on the interactions of bilingual (chinese-english) families in northeastern england. in addition, ożańska-ponikwia (2016) investigated the polish-english c-s in the uk as well. c-s among immigrant community members have also been widely studied in germany (e.g. turkish-german c-s by @xcite and c ¸etinoglu (2017), russian-german c-s by khakimov ( 2016 )). in the netherlands, c-s studies include turkish-dutch c-s by @xcite and dutch-morroccan c-s by @xcite . in belgium, meeuws and blommaert (1998) studied the french-lingala-swahili c-s among immigrants of zaire and treffers-daller (1994) studied french-dutch c-s in brussels. in spain, @xcite describes the romanian-spanish c-s among the romanian immigrants. in addition to the c-s analyses within spoken interactions of immigrant communities across europe, there are also studies about c-s within computer mediated communication as well. these studies include greek-german c-s by @xcite in germany, turkish-dutch c-s by papalexakis et al. (2014), papalexakis and dogruöz (2015) and a comparison of turkish-dutch and moroccan-dutch c-s by @xcite in the netherlands. similarly, marley (2011) compared french-arabic c-s within computer mediated interaction across moroccan communities in france and the uk. in addition to daily communication, some linguists are also interested in the c-s observed in historical documents. while @xcite explored latin-greek c-s by cicero (roman statesman), @xcite analyzed c-s in his communication with atticus (roman philosopher who studied in athens) in the roman empire. @xcite reports cases of language mixing within the catalan jewish community (in spain) in the 14th and 15th centuries and @xcite highlights the c-s between italian, slavic and turkish in the historical documents about ottoman-venetian relations. in switzerland, @xcite worked on detecting and annotating c-s patterns in diachronic and multilingual (english, french, german, italian, romansh and swiss german) alpine heritage corpus. within the media context, martin (1998) investigated english c-s in written french advertising, and onysko (2007) investigated the english c-s in german written media through corpus analyses. @xcite indicates that german speakers perceive c-s into english for advertising purposes with both positive and negative consequences. similar to humans, institutions and/or organizations could also have multilingual communication with their members and/or audience. for example, @xcite analyzed the c-s and language choice at the institutional level for european union institutions. ## c-s across languages: indian context according to the 2011 census @xcite , 26% of the population of india is bilingual, while 7% is trilingual. there are 121 major languages and 1599 other languages in india, out of which 22 (assamese, bangla, bodo, dogri, gujarati, hindi, kashmiri, kannada, konkani, maithili, malayalam, manipuri, marathi, nepali, oriya, punjabi, tamil, telugu, sanskrit, santali, sindhi, urdu) are scheduled languages with an official recognition (almost 97% of the population speaks one of the scheduled languages). most of the population ( 93%) speak languages from the indo-aryan (hindi, bengali, marathi, urdu, gujarati, punjabi, kashmiri, rajasthani, sindhi, assamese, maithili, odia) and dravidian (kannada, malayalam, telugu, tamil) language families. the census excludes languages with a population lower than 10,000 speakers. given this, it is probably difficult to find monolingual speakers in india considering the linguistic diversity and wide-spread multilingualism. @xcite provides one of the early studies on the types and functions of c-s in india with a historical understanding of the multilingual context. in addition to the mutual influences and convergence of indo-aryan and dravidian languages internally, he mentions persian and english as outside influences on indian languages. similarly, @xcite provides an excellent comparative overview about the functions of c-s in kannada in relation to the perso-arabic vs. english influences. @xcite gives examples about the formal (e.g. within nps, pps, vps) and functional (i.e. social and stylistic) aspects of hindi-english c-s from a theoretical point of view. more recently, doley (2013) explains how fish mongers in a local fish market in assam adjust and switch between assamese, english and local languages strategically to sell their products to multilingual clientele. another observation about c-s in daily life comes from @xcite who provides examples of english, assamese and bodo (another language spoken in the assam region) c-s and borrowings. in addition to english, portuguese was also in contact with the local languages as a result colonization in south india. for example, kapp (1997) explains the portuguese influence through borrowings in dravidian languages (i.e. kannada and telugu) spoken in india. instead of automatic data collection and methods of analyses, the c-s examples for the abovementioned studies are (probably) encountered and collected by the authors themselves in daily life interactions over a period of time with limited means. nowadays, these small sets of data would be regarded as insignificant in computational areas of research. however, ignoring these studies and data could have serious consequences since crucial information about the social and cultural dynamics in a multilingual setting would also be lost. for example, nadkarni (1975) proves this point by explaining how social factors influence the c-s between saraswat brahmin dialect of konkani (indo-aryan language) and kannada (dravidian language) in the south of india. both languages have been in contact with each other for over four hundred years. saraswat brahmins are fluent in both konkani and kannada but they do not speak konkani with kannada speakers and they also do not c-s between @xcite attributes this preference to the high prestige associated with konkani within the given social context. since kannada (perceived as less prestigious) is widely spoken in that region, konkani speakers learn and speak kannada for functional purposes in daily life which does not involve c-s. however, it is not common for kannada speakers to learn and speak @xcite . c-s in india has been investigated through written media, advertising and film industry as well. @xcite analyzed hindi-english c-s in the scripts of seven bollywood movies which were filmed between 1982 and 2004. her results indicate a change of direction c-s over the years. more specifically, hindi was the dominant language with occasional switches to english for the early productions but english became the dominant language especially for younger generations in the later productions. a similar trend has been observed for bengali movie scripts as well. through analyzing movie scripts (between 1970s and 2010s), chatterjee (2016) finds a drastic increase in the use of bilingual verbs (e.g. renovate koreche "renovation do") over time and attributes this rise to the increasing popularity of english in indian society. within the immigrant context, @xcite focused on the types and functions of c-s between hindi and english across the tv programs (e.g. highly scripted vs. loosely scripted programs) of a british/asian cable channel in the uk. although they have come across c-s in a variety of tv shows, the least amount of c-s was encountered in the news broadcasts (i.e. highly scripted). in general, they have encountered less c-s on tv broadcasts in comparison to the natural speech and attribute this factor to the consciousness of tv personalities about pure language use (instead of c-s). similarly, @xcite analyzed gujarati-english c-s within a radio show targeting british south asians living in the us and concluded that c-s was part of identity construction among youngsters (group identity). @xcite perform a quantitative study of 18 recent bollywood (hindi) movies and find that c-s is used for establishing identity, social dynamics between characters and the socio-cultural context of the movie. from an advertising point of view, kathpalia and wee ong (2015) analyzed c-s in hinglish (i.e. hindi, english, urdu, sanskrit according to their definition) billboards about the amul brand in india. after compiling the advertisements on billboards (1191), they classified the structures and functions of c-s. their results indicate more intrasentential c-s than intersentential ones on the billboards. in terms of function, the advertisers used c-s to indicate figures of speech (e.g. puns, associations, contradictory associations, word-creation and repetitions) to attract the attention of the target group. mohanty ( 2006 ) provides an extended overview of the multilingual education system in india exploring the types and quality of schools across a wide spectrum. in general, high-cost english medium (em) education is valued by upper-class and affluent families. although low-cost em education is also available for lower income families, he questions its impact in comparison to education in the local languages. @xcite explains that c-s is commonly practiced among students in schools across india. in addition, she finds it unrealistic to ask the students to separate the two languages harshly. in immigrant contexts, @xcite investigates how gujarati-english c-s is used among the south asian students in educational settings in the uk. another analysis reveals a shift from bengali toward english among the younger generations of the immigrant bengali community in the uk @xcite . in terms of the c-s patterns, first generation immigrants integrate english words while speaking bengali whereas english dominates the conversations of younger generations with occasional switches to bengali. there are also studies about bengali-english c-s in the uk school settings @xcite and bangladesh (obaidullah, 2016) as well. however, a systematic comparison between bengali-english c-s in india, bangladesh and immigrant settings are lacking. in their study about aphasic patients, shyamala @xcite report increased frequency of c-s between malayalam and english for aphasic patients in comparison to the control group. however, there were less differences between the groups in terms of functions of c-s. @xcite find that amount and types of c-s could be used to differentiate between healthy and mild dementia patients who are bilingual in kannada and english. although both studies are carried out with limited subjects, they offer insights about the use of c-s in health settings as well. ## computational approaches to c-s there has been significant interest in building language technologies for code-switched languages over the last few years, spanning a diverse range of tasks such as language identification, part of speech tagging, sentiment analysis and au-tomatic speech recognition. in the european language context, work has mainly focused on turkish-dutch, frisian-dutch, turkish-german and ukranian-russian with some initial attempts being made in parsing russian-komi text. in the indian language context, hindi-english is the most widely studied language pair for computational processing, with some recent work on telugu-english, tamil-english, bengali-english and gujarati-english. @xcite provide a comprehensive survey of research in computational processing of c-s text and speech and @xcite present a list of datasets available for c-s research. however, despite significant efforts, language technologies are not yet capable of processing c-s as seamlessly as monolingual data. we identify three main limitations of the current state of computational processing of c-s: data, evaluation and user-facing applications. ## conclusion the goal of this paper was to inform computational linguists and language technologists about the linguistic and social aspects c-s studies focusing on the european and indian multilingual contexts. there are some similarities (e.g. themes for linguistic research in c-s) but also differences between the two contexts in terms of the social, cultural and historical characteristics. for example, c-s in immigrant communities has been a common theme for both multilingual contexts. in europe, c-s has been widely studied within the immigrant communities who have come through labor immigration in the 1960s. however, there is a need for more research about the c-s in immigrant languages with a more recent history as well as minority languages and regional dialects. analyzing c-s in the immigration context is even more complex for indian languages. there are hardly any systematic linguistic comparisons between the c-s within the same language pairs in india and immigrant contexts (e.g. c-s between hindi-english in india vs. hindi-english in the us/uk). there is also a need for more research about c-s between less known language pairs in india. however, some of these languages are not even officially listed (e.g. in census results) since they have less than 10,000 speakers. in these cases, collecting and analyzing the multilingual and c-s data becomes more difficult. a common flaw that is shared both by linguistics and computational areas of research is to focus only on the positive evidence and assume that c-s will occur in all multilingual contexts. however, there is also a need for negative evidence to falsify this assumption. as illustrated through an example from konkani-kannada language contact in india (see section 6), bilingual speakers may prefer not to c-s due to historical, social and cultural factors operating in that setting. therefore, developing an automatic c-s system for a random pair of languages without an in-depth and systematic analysis of linguistic and social aspects of c-s in a particular context would not be very useful for the targeted users and/or language technologists. to date, the literature focusing on the social and linguistic aspects of c-s is less visible for cl researchers. this lack of visibility leads to misunder-standings and/or incomplete citations of earlier research which would have saved time and resources for cl research if resolved. one of the reasons is perhaps the differences in publishing traditions between humanities and computational areas of research. conference and workshop proceedings are commonly accepted means of publication in computational linguistics. whereas, journal publications, books and/or chapters are the publication forms in humanities. however, guidelines about how to cite publications in humanities are often missing in computational venues. there are also differences in terms of length, review cycles and open access policies between the two fields which may influence the visibility of research output for each other. it is perhaps useful to remember that science advances by standing on the shoulders of giants (i.e. building upon earlier research). with our contribution to the conference, we hope to connect the two fields and start a scientific dialogue to enhance the advancement in both fields.