MaskLID: Code-Switching Language Identification through Iterative Masking

Amir Hossein Kargaran, François Yvon, Hinrich Schütze
6/10/2024
cs.CL

Official code: cisnlp/MaskLID (12 stars, MIT, last commit 2024-06-11).

Abstract

We present MaskLID, a simple, yet effective, code-switching (CS) language identification (LID) method. MaskLID does not require any training and is designed to complement current high-performance sentence-level LIDs. Sentence-level LIDs are classifiers trained on monolingual texts to provide single labels, typically using a softmax layer to turn scores into probabilities. However, in cases where a sentence is composed in both L1 and L2 languages, the LID classifier often only returns the dominant label L1. To address this limitation, MaskLID employs a strategy to mask text features associated with L1, allowing the LID to classify the text as L2 in the next round. This method uses the LID itself to identify the features that require masking and does not rely on any external resource. In this work, we explore the use of MaskLID for two open-source LIDs (GlotLID and OpenLID), that are both based on the FastText architecture. Code and demo are available at https://github.com/cisnlp/MaskLID.

View on arXivView PDF

Code Implementations(1)

cisnlp/MaskLIDOfficial100%
MIT

[ACL 2024] 💬 MaskLID: Code-Switching Language Identification through Iterative Masking

123PythonFeb 17, 20242 years agoMIT
code-mixingcode-switchcode-switchinglanguage-identificationlanguage-identification-toolkit+1 more

Similar Papers

Cite this paper

@article{kargaran2024masklid,
  title  = {MaskLID: Code-Switching Language Identification through Iterative Masking},
  author = {Amir Hossein Kargaran and François Yvon and Hinrich Schütze},
  year   = {2024},
  eprint = {2406.06263},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.06263v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.06263.svg)](https://codeofpaper.com/paper/2406.06263)

Discussion