You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Dataset Card for OpenLID (v2)

Dataset Description

OpenLID v2 is an updated version of the OpenLID dataset. This blog post contains more details about the changes and the rationale behind them.

Dataset Summary

The OpenLID v2 dataset covers 189 languages and is designed for training language identification models. The majority of the source datasets were derived from news sites, Wikipedia, or religious text, though some come from other domains (e.g. transcribed conversations, literature, or social media). A sample of each language in each source was manually audited to check it was in the attested language (see the paper) for details).

Supported tasks

This dataset is intended for training high-coverage language identification models. The dataset is designed to be compatible with the FLORES-200 evaluation benchmark using the label conversion script provided.

Languages

There are 189 language varieties included in the dataset with varying amounts of data: the largest class (English) contains 7.5 million lines of data, and the smallest (South Azerbaijani) contains 532 lines of data. The mean number of lines per language variety is 619,799.

Dataset Structure

Data Instances

Each tab-separated entry in the dataset consists of a line of data (text), a language label consisting of an ISO 639-3 language code plus an ISO 15924 script code, and a tag indicating the source.

{
  "text": "¿Serás exaltada hasta el cielo?",
  "language": "spa_Latn",
  "dataset_source": "lti" 
}

Data Splits

Only a train split is provided. The dataset is compatible with a subset of FLORES test set using the label conversion script provided.

Dataset Creation

Curation Rationale

Recent work has found that existing language identification algorithms perform poorly in practice compared to test performance. The problem is particularly acute for low-resource languages: Kreutzer et al. (2022) found a positive Spearman rank correlation between quality of data and size of language for all of the \ac{lid}-filtered multilingual datasets they studied. In addition, for a significant fraction of the language corpora they studied, less than half of the sentences were in the correct language. They point out that such low-quality data not only leads to poor performance in downstream tasks, but that it also contributes to `representation washing', where the community is given a false view of the actual progress of low-resource natural language processing.

There are several open language identification models offering quick classification and high language coverage (e.g. CLD3, No Language Left Behind). However, to the best of our knowledge, none of the commonly-used scalable language identification systems make their training data public. OpenLID aims to address this gap by curating and combining sources of open training data for language identification and by auditing a sample of all languages in each source to check reliability.

OpenLID-v2 improves on OpenLID by updating the preprocessing script (particularly sentence segmentation) and updating the language labelling to increase reliability. Further information is available in this blog post.

Source Data

The majority of the source datasets were derived from news sites, Wikipedia, or religious text, though some come from other domains (e.g. transcribed conversations, literature, or social media). We provide a full list at the end of this model card along with the licensing information for each source.

Initial Data Collection and Normalisation

Our initial aim was to cover the same languages present in the FLORES-200 Evaluation Benchmark so that we could use this dataset for evaluation. However, during the curation process, we decided to exclude three languages (Akan, Modern Standard Arabic in Latin script, and Minangkabau in Arabic script). We also relabelled most of the micro-language labels with their macrolanguage equivalents to improve reliability. Further information on these design decisions is available in the OpenLID v1 paper and in the blog post describing OpenLID v2.

Two of the authors carried out a manual audit of a random sample of all data sources and languages: one a native Bulgarian speaker (able to read Cyrillic and Latin scripts and Chinese characters), and the other a native English speaker (able to read Latin, Arabic and Hebrew scripts). For languages we knew, we checked the language was what we expected. For unfamiliar languages in a script we could read, we compared the sample to the Universal Declaration of Human Rights or failing that, to a sample of text on Wikipedia. We compared features of the text which are common in previous language identification algorithms and could be identified easily by humans: similar diacritics, word lengths, common words, loan words matching the right cultural background, similar suffixes and prefixes, and vowel/consonant patterns. For scripts we could not read, we checked that all lines of the sample matched the script in the Universal Declaration of Human Rights.

We kept preprocessing minimal so that the process was as language agnostic as possible. The preprocessing script can be found in the scripts directory in this repository.

Considerations for Using the Data

Social Impact of Dataset

This dataset covers a number of under-served languages. This makes it a potentially useful resource, but due to the limited amount of data and domains covered, care must be taken not to overclaim performance or coverage.

Discussion of Biases

Our work aims to broaden natural language processing coverage by allowing practitioners to identify relevant data in more languages. However, we note that language identification is inherently a normative activity that risks excluding minority dialects, scripts, or entire microlanguages from a macrolanguage. Choosing which languages to cover may reinforce power imbalances, as only some groups gain access to language processing technologies.

In addition, errors in language identification can have a significant impact on downstream performance, particularly (as is often the case) when a system is used as a `black box'. The performance of our classifier is not equal across languages which could lead to worse downstream performance for particular groups. We mitigate this by providing metrics by class.

Additional information

The dataset was curated from the sources listed below by Laurie Burchell and Nikolay Bogoychev.

Licensing Information

License considerations for each source are given below. Open use for non-commercial purposes is covered by all licences. More information is available in the licenses directory in this repository.

If you view any part of this dataset as a violation of intellectual property rights, please let us know and we will remove it.

Source Description License
Arabic Dialects Dataset Dataset of Arabic dialects for Gulf, Egyptian, Levantine, and Tunisian Arabic dialects plus MSA No explicit license; website describes data as "some free and useful Arabic corpora that I have created for researchers working on Arabic Natural Language Processing, Corpus and Computational Linguistics."
BLTR Monolingual Bhojpuri corpus CC BY-NC-SA 4.0
Global Voices A parallel corpus of news stories from the web site Global Voices The website for Global Voices is licensed as Creative Commons Attribution 3.0. There is no explicit additional license accompanying the dataset.
Guaraní Parallel Set Parallel Guaraní-Spanish news corpus sourced from Paraguyan websites No explicit license
HKCanCor Transcribed conversations in Hong Kong Cantonese CC BY 4.0
IADD Arabic dialect identification dataset covering 5 regions (Maghrebi, Levantine, Egypt, Iraq, and Gulf) and 9 countries (Algeria, Morocco, Tunisia, Palestine, Jordan, Syria, Lebanon, Egypt and Iraq). It is created from five corpora: DART, SHAMI, TSAC, PADIC, and AOC. Multiple licenses: Apache License 2.0 (SHAMI); GNU Lesser General Public License v3.0 (TSAC); GNU General Public License v3 (PADIC). DART and AOC had no explicit license.
Leipzig Corpora Collection A collection of corpora in different languages with an identical format. The Terms of Usage states "Permission for use is granted free of charge solely for non-commercial personal and scientific purposes licensed under the Creative Commons License CC BY-NC."
LTI Training data for language identification From the README: "With the exception of the contents of the Europarl/, ProjectGutenberg/, and PublicDomain/ directories, all code and text in this corpus are copyrighted. However, they may be redistributed under the terms of various Creative Commons licenses and the GNU GPL. Copying the unmodified archive noncommercially is permitted by all of the licenses. For commercial redistribution or redistribution of modified versions, please consult the individual licenses."
MADAR Shared Task 2019, subtask 1 Dialectal Arabic in the travel domain The MADAR Corpus has a custom license, the text of which can be found in this repo.
EM corpus Parallel Manipuri-English sentences crawled from The Sangai Express CC BY-NC 4.0
MIZAN Parallel Persian-English corpus from literature domain CC BY 4.0
MT560 v1 A machine translation dataset for over 500 languages to English. We have filtered out data from OPUS-100, Europarl, Open Subtitles, Paracrawl, Wikimedia, Wikimatrix, Wikititles, and Common Crawl due to issues with the fidelity of the language labels. Apache License 2.0
NLLB Seed Around 6000 sentences in 39 languages sampled from Wikipedia, intended to cover languages lacking training data. CC BY-SA 4.0
SETIMES A parallel corpus of news articles in the Balkan languages CC-BY-SA 3.0
Tatoeba Collaborative sentence translations CC BY 2.0 FR
Tehran English-Persian parallel corpus (TEP) Parallel Persian-English sentences sourced from subtitles GNU General Public License
Turkic Interlingua (TIL) Corpus A large-scale parallel corpus combining most of the public datasets for 22 Turkic languages CC BY-NC-SA 4.0
WiLI-2018 Wikipedia language identification benchmark containing 235K paragraphs of 235 languages Open Data Commons Open Database License (ODbL) v1.0
XL-Sum Summarisation dataset covering 44 languages, sourced from BBC News CC BY-NC-SA 4.0

Citation Information

If you use this dataset, please cite all the authors in the citation file who compiled the source datasets, plus the OpenLID paper:

@inproceedings{burchell-etal-2023-open,
    title = "An Open Dataset and Model for Language Identification",
    author = "Burchell, Laurie  and
      Birch, Alexandra  and
      Bogoychev, Nikolay  and
      Heafield, Kenneth",
    editor = "Rogers, Anna  and
      Boyd-Graber, Jordan  and
      Okazaki, Naoaki",
    booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.acl-short.75",
    doi = "10.18653/v1/2023.acl-short.75",
    pages = "865--879",
    abstract = "Language identification (LID) is a fundamental step in many natural language processing pipelines. However, current LID systems are far from perfect, particularly on lower-resource languages. We present a LID model which achieves a macro-average F1 score of 0.93 and a false positive rate of 0.033{\%} across 201 languages, outperforming previous work. We achieve this by training on a curated dataset of monolingual data, which we audit manually to ensure reliability. We make both the model and the dataset available to the research community. Finally, we carry out detailed analysis into our model{'}s performance, both in comparison to existing open models and by language class.",
}
Downloads last month
96

Models trained or fine-tuned on laurievb/OpenLID-v2

Space using laurievb/OpenLID-v2 1