Datasets:

Modalities:
Text
Formats:
parquet
Languages:
Bashkir
License:

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 Bashkir News Multiclass Classification Dataset

This dataset contains Bashkir news and analytical articles annotated with 19 thematic categories for multiclass text classification tasks. Each article belongs to exactly one category.

Dataset Details

Dataset Description

The dataset consists of 17,897 Bashkir-language texts (articles and news pieces) collected from various online sources. Each article is classified into one of 19 thematic categories, ranging from news and society to culture, education, and sports.

  • Curated by: Arabov Mullosharaf Kurbonovich, Khaybullina Svetlana Sergeevna (BashkirNLPWorld)
  • Funded by: Not applicable
  • Shared by: BashkirNLPWorld
  • Language(s): Bashkir (Cyrillic script)
  • License: MIT License

Dataset Sources

Uses

Direct Use

This dataset is suitable for:

  • Multiclass text classification (19 classes)
  • Training classifiers for Bashkir topic categorization
  • Fine-tuning multilingual models for Bashkir text classification
  • Baseline evaluation for NLP tasks in Bashkir

Out-of-Scope Use

  • The dataset should not be used for multi-label classification (use the multilabel version instead).
  • It is not intended for binary news vs analytics tasks (use the binary version).
  • Not suitable for tasks requiring fine-grained genre distinctions beyond the defined categories.

Loading the Dataset

Using Hugging Face Datasets Library

from datasets import load_dataset

# Load the full dataset
dataset = load_dataset("BashkirNLPWorld/bashkir-news-multiclass")

# Access the training split
train_data = dataset["train"]

# View first example
print(train_data[0])

# Get all category names
categories = list(set(train_data["category"]))
print(f"Total categories: {len(categories)}")
print(f"Categories: {sorted(categories)}")

Convert to Pandas DataFrame

# Convert to pandas for easy analysis
import pandas as pd
df = train_data.to_pandas()
print(df.head())

# Category distribution
print(df['category'].value_counts())
print(f"\nAverage content length: {df['content_length'].mean():.0f} characters")

Filter by Category

# Get all news articles
news_articles = train_data.filter(lambda x: x["category"] == "Яңылыҡтар")
print(f"News articles: {len(news_articles)}")

# Get society articles
society_articles = train_data.filter(lambda x: x["category"] == "Йәмғиәт")
print(f"Society articles: {len(society_articles)}")

# Get education articles
education_articles = train_data.filter(lambda x: x["category"] == "Мәғариф")
print(f"Education articles: {len(education_articles)}")

Streaming Mode

# Stream the dataset without downloading all at once
dataset = load_dataset(
    "BashkirNLPWorld/bashkir-news-multiclass",
    split="train",
    streaming=True
)

# Iterate through examples
for i, example in enumerate(dataset):
    if i < 5:  # Show first 5
        print(f"Title: {example['title'][:50]}...")
        print(f"Category: {example['category']}")
        print(f"Content length: {example['content_length']}")
        print("-" * 50)
    else:
        break

Training a Multiclass Classifier with Transformers

from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import Trainer, TrainingArguments
import torch
import numpy as np
from sklearn.metrics import accuracy_score, f1_score

# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("bert-base-multilingual-cased")
model = AutoModelForSequenceClassification.from_pretrained(
    "bert-base-multilingual-cased",
    num_labels=19  # 19 categories
)

# Load dataset
dataset = load_dataset("BashkirNLPWorld/bashkir-news-multiclass")

# Create label mapping
categories = sorted(list(set(dataset["train"]["category"])))
label2id = {cat: idx for idx, cat in enumerate(categories)}
id2label = {idx: cat for cat, idx in label2id.items()}

# Update model config with label mapping
model.config.label2id = label2id
model.config.id2label = id2label

# Tokenize function
def tokenize_function(examples):
    return tokenizer(
        examples["content"],
        padding="max_length",
        truncation=True,
        max_length=512
    )

# Convert category to label id
def add_labels(examples):
    examples["label"] = [label2id[cat] for cat in examples["category"]]
    return examples

# Apply preprocessing
tokenized_dataset = dataset.map(tokenize_function, batched=True)
tokenized_dataset = tokenized_dataset.map(add_labels, batched=True)

# Create train/test split (80/20)
split_dataset = tokenized_dataset["train"].train_test_split(test_size=0.2, seed=42)

# Define metrics
def compute_metrics(eval_pred):
    predictions, labels = eval_pred
    predictions = predictions.argmax(axis=-1)
    accuracy = accuracy_score(labels, predictions)
    f1 = f1_score(labels, predictions, average="weighted")
    return {"accuracy": accuracy, "f1": f1}

# Training arguments
training_args = TrainingArguments(
    output_dir="./results",
    num_train_epochs=3,
    per_device_train_batch_size=16,
    per_device_eval_batch_size=16,
    evaluation_strategy="epoch",
    save_strategy="epoch",
    load_best_model_at_end=True,
    metric_for_best_model="accuracy",
)

# Create trainer
trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=split_dataset["train"],
    eval_dataset=split_dataset["test"],
    compute_metrics=compute_metrics,
)

# Train the model
# trainer.train()

Simple Baseline with Scikit-learn

from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import classification_report, accuracy_score
from sklearn.model_selection import train_test_split

# Load dataset
dataset = load_dataset("BashkirNLPWorld/bashkir-news-multiclass")
df = dataset["train"].to_pandas()

# Split data
X_train, X_test, y_train, y_test = train_test_split(
    df["content"], df["category"], test_size=0.2, random_state=42, stratify=df["category"]
)

# Vectorize text
vectorizer = TfidfVectorizer(max_features=10000, min_df=2, max_df=0.8)
X_train_vec = vectorizer.fit_transform(X_train)
X_test_vec = vectorizer.transform(X_test)

# Train classifier
clf = LogisticRegression(max_iter=1000, multi_class="ovr")
clf.fit(X_train_vec, y_train)

# Evaluate
y_pred = clf.predict(X_test_vec)
print(f"Accuracy: {accuracy_score(y_test, y_pred):.4f}")
print("\nClassification Report:")
print(classification_report(y_test, y_pred))

Dataset Structure

Data Fields

  • content (string): Full article text.
  • title (string): Article title.
  • category (string): Thematic category (one of 19 classes).
  • content_length (int64): Length of the text in characters.
  • resource (string): Original URL or resource identifier (if available).
  • date (string): Publication date (when available).

Categories and Distribution

The dataset contains 19 categories with the following distribution:

Category Count Percentage
Яңылыҡтар (News) 8,497 47.5%
Йәмғиәт (Society) 2,827 15.8%
Мәғариф (Education) 747 4.2%
Аңлатма (Explanation) 708 4.0%
Татарстан (Tatarstan) 697 3.9%
Мәҙәниәт (Culture) 536 3.0%
Юмор (Humor) 479 2.7%
Махсус хәрби операция (SMO) 396 2.2%
Дин (Religion) 378 2.1%
Еңеү (Victory) 370 2.1%
Әҙәбиәт (Literature) 359 2.0%
Хикәйә (Fiction) 352 2.0%
Донъя (World) 324 1.8%
Конкурстар (Competitions) 312 1.7%
Сәләмәтлек (Health) 251 1.4%
Иҡтисад (Economy) 177 1.0%
Спорт (Sports) 172 1.0%
Тарих (History) 159 0.9%
Башҡортостан (Bashkortostan) 156 0.9%

Category Definitions

Category (Bashkir) English Translation Description
Яңылыҡтар News Current events and news reports
Йәмғиәт Society Social issues, community life
Мәғариф Education Schools, universities, learning
Аңлатма Explanation Educational/explainatory content
Татарстан Tatarstan News about Tatarstan region
Мәҙәниәт Culture Arts, traditions, cultural events
Юмор Humor Satire, jokes, comedy
Махсус хәрби операция Special Military Operation Coverage of the SMO
Дин Religion Religious topics, Islam
Еңеү Victory WWII victory, patriotic themes
Әҙәбиәт Literature Books, writers, poetry
Хикәйә Fiction Stories, prose, narratives
Донъя World International news
Конкурстар Competitions Awards, contests, olympiads
Сәләмәтлек Health Medicine, wellness, healthcare
Иҡтисад Economy Business, finance, economics
Спорт Sports Athletics, competitions
Тарих History Historical events, figures
Башҡортостан Bashkortostan News about Bashkortostan region

Data Splits

The dataset contains a single split (train) with all 17,897 examples. Users are encouraged to create their own train/validation/test splits based on their specific needs.

Dataset Creation

Curation Rationale

The goal was to create a comprehensive multiclass classification dataset for Bashkir that covers the major thematic categories found in news and analytical content. Unlike the binary version (news vs analytics) or the multilabel version (multiple tags), this dataset assigns each article to exactly one primary category, making it suitable for standard multiclass classification tasks.

Category Selection

Categories were selected based on frequency in the normalized data and thematic coherence. Categories with fewer than 150 examples were excluded to ensure sufficient data for training.

Source Data

Data Collection and Processing

Articles were collected from 14 Bashkir online sources (see cluster dataset for full list).

Processing steps:

  1. Extracted JSONL files from raw HTML.
  2. Removed texts shorter than 50 characters or longer than 10,000 characters.
  3. Removed exact duplicates.
  4. Normalized category names (e.g., яңалыклар, Яңылыҡтар таҫмаһы, НовостиЯңылыҡтар).
  5. Selected only categories with ≥150 examples.
  6. Filtered articles belonging to the selected categories.

Who are the source data producers?

The articles were originally written by journalists, authors, and contributors of the respective online publications. The BashkirNLP team does not claim ownership of the content; it is used for non‑commercial research purposes under fair use.

Annotations

No manual annotations were added. Categories were derived automatically from normalized category labels.

Personal and Sensitive Information

The texts are public news articles and do not contain personally identifiable information (PII) beyond what is already published. No additional personal data was collected.

Bias, Risks, and Limitations

  • Class imbalance: News articles dominate (47.5%), while some categories have very few examples (e.g., Bashkortostan has only 156 examples).
  • Source bias: The dataset is dominated by certain sources (e.g., azatliqorg accounts for 28% of data).
  • Geographic bias: Separate categories for Tatarstan and Bashkortostan may reflect regional focus.
  • Genre bias: All texts are from news sources; may not represent other domains.
  • Date incompleteness: Many articles lack publication dates.

Recommendations

  • For class imbalance, consider using weighted loss functions or oversampling techniques.
  • Users should be aware of the source distribution and consider domain adaptation if applying to new sources.
  • For categories with limited examples, consider grouping or using few-shot learning approaches.

Evaluation Results

Baseline Results

Simple models can achieve strong performance on this dataset:

Model Accuracy Notes
TF-IDF + Logistic Regression ~0.85 Strong baseline
XLM-RoBERTa (fine-tuned) ~0.91 Requires GPU
BERT-multilingual (fine-tuned) ~0.90 Good performance
Random Forest ~0.82 Faster training

These results demonstrate that the thematic distinctions are well-defined in the dataset, though the large number of classes makes classification more challenging than binary tasks.

Citation

If you use this dataset in your research, please cite it as:

@dataset{arabov2025bashkirmulticlass,
  author       = {Arabov, Mullosharaf Kurbonovich and Khaybullina, Svetlana Sergeevna},
  title        = {Bashkir News Multiclass Classification Dataset},
  year         = {2026},
  publisher    = {Hugging Face},
  url          = {https://huggingface.co/datasets/BashkirNLPWorld/bashkir-news-multiclass}
}

Dataset Card Authors

  • Arabov Mullosharaf Kurbonovich
  • Khaybullina Svetlana Sergeevna
  • BashkirNLPWorld

Dataset Card Contact

Downloads last month
7