Use of Prompt-Based Learning for Code-Mixed and Code-Switched Text Classification

preprint OA: closed
Full text JSON View at publisher

Abstract

Abstract Code-mixing and code-switching (CMCS) are prevalent phenomena observed in social media conversations and various other modes of communication. When developing Natural Language Processing (NLP) systems such as sentiment analysers and hate-speech detectors that operate on this social media data, CMCS text poses challenges. Recent studies have demonstrated that prompt-based learning of pre-trained language models (PLMs) outperforms full fine-tuning of PLMs across various NLP tasks. Despite the growing interest in CMCS text classification, the effectiveness of prompt-based learning for the task remains unexplored. Our study endeavours to bridge this gap by examining the impact of prompt-based learning on CMCS text classification. We discern that the performance in CMCS text classification is significantly influenced by the inclusion of multiple scripts and the intensity of code-mixing. In response, we introduce a novel method, Dynamic+AdapterPrompt, which employs distinct models for each script, integrated with adapters. While DynamicPrompt captures the script-specific representation of CMCS text, AdapterPrompt emphasizes capturing the task-oriented functionality. Our experiments span across Sinhala-English, Kannada-English, and Hindi-English datasets, encompassing sentiment classification, hate-speech detection, and humour detection tasks. The outcomes indicate that our proposed method outperforms strong fine-tuning baselines and basic prompting strategies.
Full text 13,475 characters · extracted from preprint-html · click to expand
Use of Prompt-Based Learning for Code-Mixed and Code-Switched Text Classification | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Use of Prompt-Based Learning for Code-Mixed and Code-Switched Text Classification Pasindu Udawatta, Indunil Udayangana, Chathulanka Gamage, Ravi Shekhar, and 1 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-4248891/v1 This work is licensed under a CC BY 4.0 License Status: Published Journal Publication published 09 Sep, 2024 Read the published version in World Wide Web → Version 1 posted 9 You are reading this latest preprint version Abstract Code-mixing and code-switching (CMCS) are prevalent phenomena observed in social media conversations and various other modes of communication. When developing Natural Language Processing (NLP) systems such as sentiment analysers and hate-speech detectors that operate on this social media data, CMCS text poses challenges. Recent studies have demonstrated that prompt-based learning of pre-trained language models (PLMs) outperforms full fine-tuning of PLMs across various NLP tasks. Despite the growing interest in CMCS text classification, the effectiveness of prompt-based learning for the task remains unexplored. Our study endeavours to bridge this gap by examining the impact of prompt-based learning on CMCS text classification. We discern that the performance in CMCS text classification is significantly influenced by the inclusion of multiple scripts and the intensity of code-mixing. In response, we introduce a novel method, Dynamic+AdapterPrompt, which employs distinct models for each script, integrated with adapters. While DynamicPrompt captures the script-specific representation of CMCS text, AdapterPrompt emphasizes capturing the task-oriented functionality. Our experiments span across Sinhala-English, Kannada-English, and Hindi-English datasets, encompassing sentiment classification, hate-speech detection, and humour detection tasks. The outcomes indicate that our proposed method outperforms strong fine-tuning baselines and basic prompting strategies. code-mixing code-switching prompt-based learning text classification script adapters Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Published Journal Publication published 09 Sep, 2024 Read the published version in World Wide Web → Version 1 posted Editorial decision: Revision requested 18 Jul, 2024 Reviews received at journal 07 Jul, 2024 Reviews received at journal 26 May, 2024 Reviewers agreed at journal 22 May, 2024 Reviewers agreed at journal 30 Apr, 2024 Reviewers invited by journal 30 Apr, 2024 Editor assigned by journal 15 Apr, 2024 Submission checks completed at journal 10 Apr, 2024 First submitted to journal 10 Apr, 2024 You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-4248891","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":289909512,"identity":"7cf2c147-8e9c-43ee-93a0-239ecb5f0caa","order_by":0,"name":"Pasindu Udawatta","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABBElEQVRIiWNgGAWjYJCCAwxsQJKZ+eADZFEZCYJa2NmSDSB8ZjDJg08LA1gLP4+ZBFFazNmPPzxcUHY4sYGZLa3ixx8bBt3Z5w8w/Khh4JFswK7FsifH4PCMcyAtzMdu9ralMZidS2Zg7DnGwCONwxaDAzkMh3nbILbcZmw4zGB2Bugw3gYGHjlcWs4/fwDVwmNWzPDnP1gL4198Wm4kGMC1MDOwHQBrYQbZgsthljPeGBzmOZdu3MbMlizZ25bMA9RicFjmmARO75vzpz/+zFNmLdvPf/jghx9/7OTMzjA+fPimxkZO4gAOh8EYbFCaB0QAFeOOSAOcMqNgFIyCUTAKYAAAm+tReO0QtLIAAAAASUVORK5CYII=","orcid":"","institution":"University of Moratuwa","correspondingAuthor":true,"prefix":"","firstName":"Pasindu","middleName":"","lastName":"Udawatta","suffix":""},{"id":289909513,"identity":"65d74a8b-ebf7-4852-99e4-bc628aead3dd","order_by":1,"name":"Indunil Udayangana","email":"","orcid":"","institution":"University of Moratuwa","correspondingAuthor":false,"prefix":"","firstName":"Indunil","middleName":"","lastName":"Udayangana","suffix":""},{"id":289909514,"identity":"5ee9c5f0-ed13-4402-97da-9aece6224355","order_by":2,"name":"Chathulanka Gamage","email":"","orcid":"","institution":"University of Moratuwa","correspondingAuthor":false,"prefix":"","firstName":"Chathulanka","middleName":"","lastName":"Gamage","suffix":""},{"id":289909515,"identity":"18f8000d-85d5-4512-820e-80477a310056","order_by":3,"name":"Ravi Shekhar","email":"","orcid":"","institution":"University of Essex","correspondingAuthor":false,"prefix":"","firstName":"Ravi","middleName":"","lastName":"Shekhar","suffix":""},{"id":289909516,"identity":"af74c07b-99dd-4de7-92d3-7785fd254822","order_by":4,"name":"Surangika Ranathunga","email":"","orcid":"","institution":"Massey University","correspondingAuthor":false,"prefix":"","firstName":"Surangika","middleName":"","lastName":"Ranathunga","suffix":""}],"badges":[],"createdAt":"2024-04-10 18:27:58","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-4248891/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-4248891/v1","draftVersion":[],"editorialEvents":[{"content":"https://doi.org/10.1007/s11280-024-01302-2","type":"published","date":"2024-09-09T15:57:19+00:00"}],"editorialNote":"","failedWorkflow":false,"files":[{"id":64618999,"identity":"ee195998-78b9-4371-a202-3aed12af4e55","added_by":"auto","created_at":"2024-09-16 16:10:30","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":681512,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-4248891/v1_covered_235e8963-56a5-4b23-8783-cd443abd8904.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Use of Prompt-Based Learning for Code-Mixed and Code-Switched Text Classification","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":true,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"world-wide-web","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"wwwj","sideBox":"Learn more about [World Wide Web](http://link.springer.com/journal/11280)","snPcode":"11280","submissionUrl":"https://submission.nature.com/new-submission/11280/3","title":"World Wide Web","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"em","reportingPortfolio":"Springer Hybrid","inReviewEnabled":true,"inReviewRevisionsEnabled":false},"keywords":"code-mixing, code-switching, prompt-based learning, text classification, script, adapters","lastPublishedDoi":"10.21203/rs.3.rs-4248891/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-4248891/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eCode-mixing and code-switching (CMCS) are prevalent phenomena observed in social media conversations and various other modes of communication. When developing Natural Language Processing (NLP) systems such as sentiment analysers and hate-speech detectors that operate on this social media data, CMCS text poses challenges. Recent studies have demonstrated that prompt-based learning of pre-trained language models (PLMs) outperforms full fine-tuning of PLMs across various NLP tasks. Despite the growing interest in CMCS text classification, the effectiveness of prompt-based learning for the task remains unexplored. Our study endeavours to bridge this gap by examining the impact of prompt-based learning on CMCS text classification. We discern that the performance in CMCS text classification is significantly influenced by the inclusion of multiple scripts and the intensity of code-mixing. In response, we introduce a novel method, Dynamic+AdapterPrompt, which employs distinct models for each script, integrated with adapters. While DynamicPrompt captures the script-specific representation of CMCS text, AdapterPrompt emphasizes capturing the task-oriented functionality. Our experiments span across Sinhala-English, Kannada-English, and Hindi-English datasets, encompassing sentiment classification, hate-speech detection, and humour detection tasks. The outcomes indicate that our proposed method outperforms strong fine-tuning baselines and basic prompting strategies.\u003c/p\u003e","manuscriptTitle":"Use of Prompt-Based Learning for Code-Mixed and Code-Switched Text Classification","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2024-04-15 04:42:55","doi":"10.21203/rs.3.rs-4248891/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2024-07-19T01:45:25+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2024-07-07T11:57:57+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2024-05-26T22:28:31+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"44498130497999584927003590223916905200","date":"2024-05-22T11:35:06+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"123078777160460381034475430825174772128","date":"2024-04-30T05:35:06+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2024-04-30T05:08:36+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2024-04-16T02:16:28+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2024-04-11T01:50:39+00:00","index":"","fulltext":""},{"type":"submitted","content":"World Wide Web","date":"2024-04-10T18:26:38+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"world-wide-web","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"wwwj","sideBox":"Learn more about [World Wide Web](http://link.springer.com/journal/11280)","snPcode":"11280","submissionUrl":"https://submission.nature.com/new-submission/11280/3","title":"World Wide Web","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"em","reportingPortfolio":"Springer Hybrid","inReviewEnabled":true,"inReviewRevisionsEnabled":false}}],"origin":"","ownerIdentity":"f6412c13-01ac-4202-b276-131f6a8eb254","owner":[],"postedDate":"April 15th, 2024","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"published-in-journal","subjectAreas":[],"tags":[],"updatedAt":"2024-09-16T16:00:47+00:00","versionOfRecord":{"articleIdentity":"rs-4248891","link":"https://doi.org/10.1007/s11280-024-01302-2","journal":{"identity":"world-wide-web","isVorOnly":false,"title":"World Wide Web"},"publishedOn":"2024-09-09 15:57:19","publishedOnDateReadable":"September 9th, 2024"},"versionCreatedAt":"2024-04-15 04:42:55","video":"","vorDoi":"10.1007/s11280-024-01302-2","vorDoiUrl":"https://doi.org/10.1007/s11280-024-01302-2","workflowStages":[]},"version":"v1","identity":"rs-4248891","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-4248891","identity":"rs-4248891","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2024) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00