Skip to main content
QUICK REVIEW

[Paper Review] LanideNN: Multilingual Language Identification on Character Window

Tom Kocmi, Ondřej Bojar|arXiv (Cornell University)|Jan 12, 2017
Natural Language Processing TechniquesComputer Science14 references5 citations
TL;DR

LanideNN proposes a bidirectional recurrent neural network (BRNN) model for multilingual language identification that operates on character-level sliding windows, enabling accurate detection of language boundaries in short, multilingual texts without preprocessing. It achieves state-of-the-art performance across 131 languages on monolingual and multilingual benchmarks, maintaining high accuracy even on short documents and across domains, with a micro-F1 score of 0.965 on the ALTW 2010 shared task.

ABSTRACT

In language identification, a common first step in natural language processing, we want to automatically determine the language of some input text. Monolingual language identification assumes that the given document is written in one language. In multilingual language identification, the document is usually in two or three languages and we just want their names. We aim one step further and propose a method for textual language identification where languages can change arbitrarily and the goal is to identify the spans of each of the languages. Our method is based on Bidirectional Recurrent Neural Networks and it performs well in monolingual and multilingual language identification tasks on six datasets covering 131 languages. The method keeps the accuracy also for short documents and across domains, so it is ideal for off-the-shelf use without preparation of training data.

Motivation & Objective

  • To develop a robust, off-the-shelf language identification system that handles arbitrary language switching in short texts without requiring document-level assumptions.
  • To extend language identification beyond monolingual documents to detect multiple languages within a single text, including code-switching and formal markup languages.
  • To create a model that generalizes across domains and document lengths without fine-tuning or domain-specific adaptation.
  • To cover a broad range of languages—131 in total—using a single unified architecture trained on a newly collected, cleaned dataset.
  • To provide a practical, reusable tool for real-world applications involving multilingual and noisy text, such as social media or email.

Proposed method

  • The model uses a bidirectional recurrent neural network (BRNN) to process fixed-size character windows, assigning a language label to each character in the input sequence.
  • Input is represented as one-hot encoded characters from a predefined vocabulary, with no preprocessing such as tokenization or normalization.
  • The network is trained end-to-end to predict the language of each character in a sliding window, enabling detection of language boundaries at the character level.
  • The model is trained on a newly collected and manually cleaned dataset covering 131 languages, with data augmentation to improve robustness.
  • For multilingual documents, the model identifies language spans directly by predicting the language per character, allowing detection of code-switching.
  • The system is evaluated on standard monolingual and multilingual benchmarks, including ALTW 2010 and WikipediaMulti, with no domain-specific adaptation.

Experimental results

Research questions

  • RQ1Can a neural network model trained on character-level windows achieve high accuracy in identifying multiple languages within a single short text, even when languages are mixed?
  • RQ2How does the performance of a BRNN-based model compare to traditional n-gram and Naive Bayes methods in multilingual and monolingual language identification tasks?
  • RQ3To what extent does the model generalize across different text domains and document lengths without retraining or adaptation?
  • RQ4Can the model detect language boundaries in texts that include non-linguistic elements such as HTML or URLs?
  • RQ5How does the model perform on low-resource languages and in scenarios with overlapping scripts?

Key findings

  • On the ALTW 2010 shared task, LanideNN achieved a micro-F1 score of 0.965, outperforming all other systems, including those specifically designed for bilingual documents.
  • The non-adapted version of LanideNN achieved a micro-F1 score of 0.941 on the same benchmark, demonstrating strong generalization without task-specific tuning.
  • On the WikipediaMulti dataset, the model trained on the authors' own corpus achieved comparable performance to a model fine-tuned on the official training set, especially when restricted to languages present in the test set.
  • The model maintains high accuracy on short texts (50–130 characters), successfully detecting language switches even when scripts are similar or shared.
  • The model correctly identifies language boundaries in mixed-language segments, including cases involving HTML and other markup languages, as demonstrated in qualitative examples.
  • The system outperforms existing tools like CLD2 and Langid.py in multilingual and short-text scenarios, particularly in detecting code-switching and low-resource languages.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.