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.

ViLegalTexts: A 16GB Vietnamese Legal Pre-training Corpus

License: Apache 2.0 HuggingFace

This repository contains the pre-training corpus used to train ViLegalLM. The corpus was crawled from four publicly available Vietnamese legal repositories: Thư Viện Pháp Luật (TVPL), Văn Bản Pháp Luật (VBPL), LuatVietnam, and LawNet. For full details, please refer to the paper: Read paper


📋 Overview

Property Value
Language Vietnamese
Domain Legal
Corpus size 16 GB
Format .zip containing multiple .txt files
Sources 4 public Vietnamese legal repositories
License Apache 2.0

🔧 Data Processing Pipeline

The raw corpus underwent a 4-stage preprocessing pipeline:

Content Extraction → Text Cleaning → Language Identification → Deduplication

For full details of each stage, please refer to the paper.

The final corpus is distributed as .zip files, each containing multiple .txt files (one document per file), with a total uncompressed size of 16 GB.


🚀 Usage

Clone this repository

apt-get install -y git-lfs
git lfs install

git clone https://your_username:YOUR_HF_TOKEN@huggingface.co/datasets/ntphuc149/ViLegalText

Unzip pre-training corpus

import os

os.makedirs("/process", exist_ok=True)
zip_path = f"/ViLegalText/ViLegalText.zip"
print(f"📦 Giải nén: ViLegalText.zip")
os.system(f'unzip -q "{zip_path}" "*.txt" -d /process/')

print("✅ Xong!")

Preview a sample file

with open("/process/doc_0.txt", encoding="utf-8") as f:
    print(f.read())

🤖 Models Trained on This Corpus

This corpus was used to continually pretrain the following models, all publicly available:

Model Architecture Parameters Max Length HuggingFace
ViLegalBERT Encoder-only (MLM) 135M 256 ntphuc149/ViLegalBERT
ViLegalQwen2.5-1.5B-Base Decoder-only (CLM) 1.54B 2,048 ntphuc149/ViLegalQwen2.5-1.5B-Base
ViLegalQwen3-1.7B-Base Decoder-only (CLM) 1.72B 4,096 ntphuc149/ViLegalQwen3-1.7B-Base

📄 Citation

If you use this corpus in your research, please cite:

UPDATE SOON!

⚠️ Intended Use & Limitations

  • This corpus is intended for research purposes in Vietnamese legal NLP.
  • Documents are collected from publicly available Vietnamese legal repositories. No personally identifiable information is included.
  • Models trained on this corpus are not intended to replace professional legal counsel. Users should not rely solely on model outputs for consequential legal decisions without qualified professional consultation.
  • The corpus may inherit biases present in the source repositories, including temporal bias, regional variations, and domain coverage imbalances.

🔗 Related Resources

Downloads last month
20

Models trained or fine-tuned on ntphuc149/ViLegalText

Collection including ntphuc149/ViLegalText