bcs-lang-id / README.md
absltnull's picture
Update README.md
4e43706 verified
|
Raw History Blame Contribute Delete
5.28 kB
---
dataset_info:
features:
- name: text
dtype: string
- name: label
dtype: string
splits:
- name: train
num_bytes: 16889750
num_examples: 56480
- name: valid
num_bytes: 2558933
num_examples: 8997
download_size: 13356074
dataset_size: 19448683
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: valid
path: data/valid-*
license: cc-by-sa-4.0
task_categories:
- text-classification
language:
- bs
- hr
- sr
tags:
- langid
- lid
- bosnian
- croatian
- serbian
pretty_name: Bosnian Croatian Serbian (BCS) Language Identification Dataset
size_categories:
- 10K<n<100K
---
# Bosnian Croatian Serbian (BCS) Language Identification Dataset
This dataset is what was used to train [RoBERTo-v2](https://huggingface.co/absltnull/RoBERTo-v2): a Latin-only accurate language BCS identification/differentiation model. As suggested, this dataset is intentionally Latin-only to remove any Serbian-related bias related to Cyrillic script.
## Common Problem
General LID models fail at differentiating the BCS language group because it is naturally tightly related and almost identical, therefore it is harder for computers to notice the difference while also tasked to differentiate hundreds of other languages. Additionally, other language identification datasets commonly mix this language group, mislabeling the related languages with each other, creating a feedback loop between LID models trained on the same or distilled data.
## The Fix
I've made it my goal to make Bosnian, Croatian, and Serbian more accessible to the masses with well-labeled, accurate data, such as the upcoming **BOR-CORPUS** text generation dataset, or the dataset you are currently looking at. Now, how is this dataset *"more accurate"* than others?
Source labeling.
I've collected data from Twitter, SETimes and Wikipedia, and labeled the languages without using a LID model, but instead by the source of the text. Twitter posts were labeled by the origin country of the accounts, SETimes was labeled by the origin country, and Wikipedia was labeled by the language group it was written in.
That way, we have a *mostly* accurate LID dataset for these languages, as seen in RoBERTo-v2's 20-point accuracy and F1 jump when compared to the original RoBERTo model on this dataset's evaluation split.
## How to Use
Just copy-paste this to load it:
```python
from datasets import load_dataset
dataset = load_dataset("absltnull/bcs-lang-id")
```
The dataset contains a `text` and `label` column. Length of `text` is 512 characters max, while `label` can be either "bs", "hr" or "sr".
About 13MB to download. Counts of each language in each split:
Split: train
**hr:** 19125
**sr:** 18748
**bs:** 18607
Split: valid
**hr:** 3060
**sr:** 2987
**bs:** 2950
## Examples
Bosnian examples:
`{"text": "Stanovništvo Na popisu stanovništva 2011. godine, Laze pri Domžalah su imale 27 stanovnika. Broj stanovnika po popisima 1991 2002 2011 23 25 27 Napomena: Do 1955.", "label": "bs"}`
`{"text": "godine, Selo pri Robu je imalo 36 stanovnika. Broj stanovnika po popisima 1991 2002 2011 30 41 36 Napomena: Do 1953. iskazivano pod imenom Selo.", "label": "bs"}`
`{"text": "ćuti, za to nemamo dozvolu :-) bolji od originala crnamačkabelimačor", "label": "bs"}`
Croatian examples:
`{"text": "u njemu je živjelo 835 stanovnika. Stanovništvo Grupa 2000. 2010.", "label": "hr"}`
`{"text": "- Gérard Henri de Vaucouleurs, francuski astronom (* 1918.) 2025. - Halid Bešlić, bosanskohercegovački pjevač narodne glazbe (* 1953.) Blagdani i spomendani Nacionalni dan borbe protiv raka dojke u Hrvatskoj sv.", "label": "hr"}`
`{"text": "Pojedinačno PH za juniore-ke: Vis (M), 1. Lazarić 2. Grdanjski", "label": "hr"}`
Serbian examples:
`{"text": "... Prema izveštaju, Kosovo zauzima najgore mesto na Balkanu po korupciji i organizovanom kriminalu, ali kosovski građani imaju najviše poverenja ", "label": "sr"}`
`{"text": "... Tokom leta 1840, njegov otac, kamenorezac, dobio je zadatak od novog dekana katedrale, Berskoua, da izvrši velike radove u horu u duhu neogotike.", "label": "sr"}`
`{"text": "... Godine 1895, podelili su se i osnovali Čistu stranku prava, koja je postala poznata pod nazivom \"Frankovci\".", "label": "sr"}`
## Limitations
The dataset does include some mistakes and mislabels, as all do. A Croatian Twitter account does not only post in Croatian, Wikipedia writers don't have to specifically write in the same language, as they're "close enough for mutual intelligibility", and reporters on SETimes don't have to speak in the claimed language. However, with better models, such as RoBERTo-v2, these biases will eventually be cleaned.
## Legal
All of the data was pulled from existing, licensed datasets: `rsateam/sr-bs-hr-language-id` (Wikipedia text), [The Twitter user dataset for discriminating between Bosnian, Croatian, Montenegrin and Serbian](https://github.com/clarinsi/benchich/blob/main/lang/data/Twitter-HBS.json) (Twitter posts), and [SETimes-HBS](https://github.com/clarinsi/benchich/blob/main/lang/data/SETimes.HBS.json) (SETimes news articles). Everything was crawled/pulled/scraped with proper permission.
Enjoy. Made with love in Bosnia.