Arailym-tleubayeva/KazakhLawCorpus-clean
KazakhLawCorpus-clean Dataset Summary KazakhLawCorpus-clean is a cleaned, Kazakh-only corpus of legislative documents from the Republic of Kazakhstan. It is a processed derivative of the original Arailym-tleubayeva/KazakhLawCorpus dataset. The original dataset repository was downloaded from Hugging Face and used as the source for this release. Its laws_metadata.csv file contained 223,245 legislative records with multilingual fields and source-oriented metadata.… See the full description on the dataset page: https://huggingface.co/datasets/Arailym-tleubayeva/KazakhLawCorpus-clean.
KazakhLawCorpus-clean
Dataset Summary
KazakhLawCorpus-clean is a cleaned, Kazakh-only corpus of legislative documents from the Republic of Kazakhstan. It is a processed derivative of the original Arailym-tleubayeva/KazakhLawCorpus dataset.
The original dataset repository was downloaded from Hugging Face and used as the source for this release. Its laws_metadata.csv file contained 223,245 legislative records with multilingual fields and source-oriented metadata.
The cleaned release contains 215,889 unique Kazakh-language legislative records, with one row representing one legal act. Each record includes the available legal, temporal, institutional, regional, publication, and source metadata extracted from the official Adilet legal information system.
The dataset contains 25 metadata fields and covers legal acts adopted between 1947-10-30 and 2026-07-20.
The corpus is intended for research and development in:
- Legal information retrieval
- Retrieval-augmented generation
- Legal question answering
- Legal document classification
- Semantic search
- Legal natural language processing
- Language model adaptation
- Corpus linguistics
- Low-resource Kazakh-language NLP
Dataset Origin and Derivation
KazakhLawCorpus-clean was produced from the original KazakhLawCorpus dataset through a reproducible cleaning and validation pipeline.
The processing procedure included:
- Selecting the Kazakh-language fields with the
_kksuffix. - Removing the corresponding Russian-language fields with the
_rusuffix. - Removing mixed-language base fields where Kazakh-specific versions were available.
- Renaming the retained Kazakh-language fields to their base field names.
- Converting source-system placeholders to null values.
- Detecting and removing CAPTCHA, bot-verification, and scraping artefacts.
- Removing records without usable Kazakh-language content.
- Removing records missing the essential
titleordescriptionfields. - Validating the dataset schema and identifiers.
- Confirming the one-row-per-law structure.
- Preserving the available source, temporal, legal-status, institutional, publication, and regional metadata.
The original dataset contained 223,245 records. During preprocessing, 7,356 records were removed, resulting in a final corpus of 215,889 unique Kazakh-language legislative records.
The original source dataset remains available separately and has not been replaced or modified by this cleaned release.
Relationship Between the Repositories
Users who require the original multilingual fields, historical versions, reference links, or unprocessed source metadata should use KazakhLawCorpus.
Users who require a cleaned Kazakh-language table for NLP, information retrieval, semantic search, legal document classification, corpus analysis, or retrieval-augmented generation should use KazakhLawCorpus-clean.
Dataset Statistics
Data File
The dataset is distributed as:
data/kazakhlawcorpus_kk_only.csvEach row corresponds to one legal act.
Dataset Structure
Dataset Schema
The dataset contains the following 25 fields:
Cleaning Pipeline
The corpus was produced using a reproducible, multi-stage cleaning pipeline.
- Kazakh-language fields ending in
_kkwere selected. - Russian-language fields ending in
_ruwere removed. - Mixed-language base fields were removed where language-specific fields were available.
- Retained
_kkcolumns were renamed to their corresponding base names. - Source placeholders such as
"ЖОҚ","НЕТ","N/A","-", and"---"were converted to null values. - CAPTCHA, bot-verification, and scraping artefacts were identified and removed.
- Records without usable Kazakh-language content were removed.
- Records missing the required
titleordescriptionfields were removed. - Identifier uniqueness was validated.
- Date fields were validated.
- URL fields were checked.
- Duplicate titles and descriptions were analysed.
- Metadata consistency checks were performed.
- The final one-row-per-law structure was confirmed.
Quality Validation
The dataset underwent the following validation procedures:
- [x] Schema validation
- [x] Identifier validation
- [x] Duplicate identifier detection
- [x] Missing-value analysis
- [x] Metadata completeness analysis
- [x] URL validation
- [x] Date validation
- [x] Unicode validation
- [x] Encoding validation
- [x] CAPTCHA and bot-verification detection
- [x] Statistical quality assessment
- [x] One-row-per-law structure validation
Known Limitations
Some metadata fields are sparse because the corresponding information is absent from the original source database.
Fields with relatively high levels of missing data may include:
developer_bodyregulatory_bodyministry_registration_datedate_modifieddate_published
These missing values reflect the completeness of the original source rather than errors introduced during preprocessing.
The is_archive field is constant in the current release and should therefore not be treated as an informative feature for statistical modelling.
Duplicate titles may occur legitimately because many legal acts follow standardised naming conventions or share similar titles across regions, institutions, and adoption dates.
The dataset represents the source records available at the time of collection and may not reflect subsequent amendments, repeals, or corrections made in the official legal information system.
Intended Uses
The dataset may be used for research and development in:
- Sparse legal document retrieval
- Dense retrieval
- BM25 evaluation
- Hybrid retrieval
- Retrieval-augmented generation
- Legal question answering
- Legal document classification
- Legal search systems
- Text similarity detection
- Metadata prediction
- Corpus analysis
- Language model fine-tuning
- Domain adaptation for Kazakh-language models
Out-of-Scope Uses
This dataset must not be treated as a source of legal advice.
Users should verify legal provisions, document status, amendments, and current applicability against official legal information sources before making legal, administrative, financial, or policy decisions.
The dataset should not be used as the sole basis for automated decisions that may affect individuals, organisations, or legal rights.
Loading the Dataset
The dataset can be loaded using the Hugging Face datasets library:
from datasets import load_dataset
dataset = load_dataset(
"Arailym-tleubayeva/KazakhLawCorpus-clean"
)
df = dataset["train"].to_pandas()To inspect the dataset structure:
print(dataset)
print(dataset["train"].column_names)
print(dataset["train"][0])Reproducibility
The accompanying analysis and preprocessing pipeline supports reproducible:
- Data cleaning
- Schema validation
- Identifier validation
- Duplicate analysis
- Missing-value analysis
- Metadata completeness assessment
- Statistical summaries
- Publication-quality figure generation
quality_report.jsongeneration
The original dataset remains available in a separate repository, allowing users to compare the cleaned release with its source data.
License
This dataset is released under the Creative Commons Attribution 4.0 International — CC BY 4.0 license.
Users may share and adapt the dataset for any purpose, provided that appropriate attribution is given.
Citation
When using this dataset, please cite it as follows:
Tleubayeva, A., Mansurova, A., Shomanov, A., Makhambetova, Z., & Boluk, P. S. (2026). KazakhLawCorpus: A Large-Scale Metadata Corpus for Kazakh Legislation. Data, 11(9), 217. https://doi.org/10.3390/data11090217
Users should also cite the original KazakhLawCorpus dataset when relying on its original collection, source metadata, or multilingual content.
Author
- Arailym Tleubayeva
Contact
For questions, suggestions, error reports, or contributions, please use the issue tracker in the Hugging Face dataset repository.
