Hostname: page-component-74656f9884-rngvg Total loading time: 0 Render date: 2026-11-05T10:21:57.045Z Has data issue: false hasContentIssue false

SwitchNet: Learning to switch for word-level language identification in code-mixed social media text

Published online by Cambridge University Press:  03 June 2021

Neelakshi Sarma*
Affiliation:
Department of Computer Science and Engineering, Indian Institute of Technology Guwahati, Guwahati, 781039, India
Ranbir Sanasam Singh
Affiliation:
Department of Computer Science and Engineering, Indian Institute of Technology Guwahati, Guwahati, 781039, India
Diganta Goswami
Affiliation:
Department of Computer Science and Engineering, Indian Institute of Technology Guwahati, Guwahati, 781039, India
*
*Corresponding author. E-mail: s.neelakshi@iitg.ac.in
Rights & Permissions [Opens in a new window]

Abstract

Word-level language identification is an essential prerequisite for extracting useful information from code-mixed social media content. Previous studies in word-level language identification show two important observations. First, the local context is an important indicator of the language of a word when a word is valid in multiple languages. Second, considering the word in isolation from its context leads to more effective language classification when a word is borrowed or embedded into sentences of other languages. In this paper, we propose a framework for language identification that makes use of a dynamic switching mechanism for effective language classification of both words that are borrowed or embedded from other languages as well as words that are valid in multiple languages. For a given input, the proposed switching mechanism makes a dynamic decision to bias its prediction either towards the prediction obtained by the contextual information or that obtained by the word in isolation. In contrast to existing studies that rely upon large amounts of annotated data for robust performance in a multilingual environment, the proposed approach uses minimal annotated resources and no external resources, making it easily extendible to newer languages. Evaluation over a corpus of transliterated Facebook comments shows that the proposed approach outperforms its baseline counterparts: classification based on the contextual information, classification based on the word in isolation, as well as an ensemble of the two classifiers.

Information

Type
Article
Copyright
© The Author(s), 2021. Published by Cambridge University Press
Figure 0

Figure 1. Proposed word-level classifier combining output word-level classifiers built using word in isolation (C1) and using contextual information (C2).

Figure 1

Figure 2. Generation of feature vectors from input text using different components.

Figure 2

Table 1. Description of the dataset annotated at the sentence level

Figure 3

Table 2. Description of word-level annotations obtained using sentence-level annotations

Figure 4

Table 3. Description of the dataset used to train and evaluate the proposed switch network

Figure 5

Table 4. Language-wise F-scores and average macro-Fscore (MacF) and micro-Fscore (MicF) obtained by the baseline classifiers

Figure 6

Table 5. Max achievable MicroF by combining baselines

Figure 7

Table 6. Performance obtained by neural ensembling of the baseline classifiers (using word in isolation and using contextual information)

Figure 8

Figure 3. 2D projection of word2vec word embeddings.

Figure 9

Figure 4. Average of precision@k for words in $\mathcal{R}$.

Figure 10

Table 7. Language-wise and macro- (MacF) and micro- (MicF) average F-scores obtained using the proposed framework under different classification set-ups and the relative performance with respect to the baseline components

Figure 11

Figure 5. Performance obtained using the proposed model (content features) with varying number of training samples.

Figure 12

Figure 6. Figure showing the value of switch vector y for different input text.

Figure 13

Figure 7. L1 norm of the switch vector $\textbf{y.}$