paper-with-me

홈 › Papers

Conditioning LLMs to Generate Code-Switched Text: A Methodology Grounded in Naturally Occurring Data

2025-02-18 · Maite Heredia, Gorka Labaka, Jeremy Barnes, Aitor Soroa

Code-switching (CS) is still a critical challenge in Natural Language Processing (NLP). Current Large Language Models (LLMs) struggle to interpret and generate code-switched text, primarily due to the scarcity of large-scale CS datasets for training. This paper presents a novel methodology to generate CS data using LLMs, and test it on the English-Spanish language pair. We propose back-translating natural CS sentences into monolingual English, and using the resulting parallel corpus to fine-tune LLMs to turn monolingual sentences into CS. Unlike previous approaches to CS generation, our methodology uses natural CS data as a starting point, allowing models to learn its natural distribution beyond grammatical patterns. We thoroughly analyse the models' performance through a study on human preferences, a qualitative error analysis and an evaluation with popular automatic metrics. Results show that our methodology generates fluent code-switched text, expanding research opportunities in CS communication, and that traditional metrics do not correlate with human judgement when assessing the quality of the generated CS data. We release our code and generated dataset under a CC-BY-NC-SA license.

📄 PDF Abstract BibTeX arXiv:2502.12924

Code (1)

hitz-zentroa/cs-generation 공식 구현 pytorch

Similar Papers 제목 키워드 기반

Can Large Language Models Understand, Reason About, and Generate Code-Switched Text?

2026-01-12 · Genta Indra Winata, David Anugraha, Patrick Amadeus Irawan, Anirban Das 외 arxiv

Code-switching is a pervasive phenomenon in multilingual communication, yet the robustness of large language models (LLMs) in mixed-language settings remains insufficiently understood. In this work, we present a comprehe…

Linguistics Theory Meets LLM: Code-Switched Text Generation via Equivalence Constrained Large Language Models

2024-10-30 · Garry Kuwanto, Chaitanya Agarwal, Genta Indra Winata, Derry Tanti Wijaya

Code-switching, the phenomenon of alternating between two or more languages in a single conversation, presents unique challenges for Natural Language Processing (NLP). Most existing research focuses on either syntactic c…

Text Generationvalid

From Machine Translation to Code-Switching: Generating High-Quality Code-Switched Text

2021-07-14 · ACL 2021 5 · Ishan Tarunesh, Syamantak Kumar, Preethi Jyothi

Generating code-switched text is a problem of growing interest, especially given the scarcity of corpora containing large volumes of real code-switched text. In this work, we adapt a state-of-the-art neural machine trans…

Data AugmentationLanguage ModelingLanguage ModellingMachine Translation+2

Breaking Language Barriers: Equitable Performance in Multilingual Language Models

2025-08-18 · Tanay Nagar, Grigorii Khvatskii, Anna Sokol, Nitesh V. Chawla arxiv

Cutting-edge LLMs have emerged as powerful tools for multilingual communication and understanding. However, LLMs perform worse in Common Sense Reasoning (CSR) tasks when prompted in low-resource languages (LRLs) like Hin…

Common Sense Reasoning

AsyncSwitch: Asynchronous Text-Speech Adaptation for Code-Switched ASR

2025-06-17 · Tuan Nguyen, Huy-Dat Tran

Developing code-switched ASR systems is challenging due to language ambiguity and limited exposure to multilingual, code-switched data, while collecting such speech is costly. Prior work generates synthetic audio from te…

Decoder