You need to agree to share your Hugging Face 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.

Vietnamese Legal Documents

A comprehensive collection of Vietnamese legal documents — laws, decrees, circulars, decisions, and other normative acts — sourced from vbpl.vn, the official Government Legal Document Portal operated by the Ministry of Justice. The dataset includes structured metadata for every document, raw HTML full-text content, and a rich graph of cross-document legal relationships (amendments, citations, repeals, etc.).

Quick Start

from datasets import load_dataset

# Metadata for all 153k documents
meta = load_dataset("th1nhng0/vietnamese-legal-documents", "metadata", split="data")
print(meta.to_pandas().head())

# Cross-document relationships (amendments, citations, repeals, …)
rels = load_dataset("th1nhng0/vietnamese-legal-documents", "relationships", split="data")
print(rels.to_pandas().head())

# Full-text HTML content for ~149k documents
content = load_dataset("th1nhng0/vietnamese-legal-documents", "content", split="data")
print(content.to_pandas().head())

Join the two on id (metadata) ↔ doc_id (relationships):

import pandas as pd

df = meta.to_pandas()
rel = rels.to_pandas()

# Find all documents that cite document 10420
citing = rel[rel["other_doc_id"] == "10420"].merge(df, left_on="doc_id", right_on="id")
print(citing[["id", "title", "relationship"]])

Dataset Structure

The dataset has three configs:

Config Rows Description
metadata 153,420 One row per document — 16 metadata fields
content 178,665 Raw HTML full-text content
relationships 897,890 Directed edges between documents

metadata

Column Description
id Unique document ID (int)
title Full Vietnamese title
so_ky_hieu Official number, e.g. 115/NQ-HĐBCQG
ngay_ban_hanh Issuance date (DD/MM/YYYY)
loai_van_ban Type — Quyết định, Nghị quyết, Thông tư, …
ngay_co_hieu_luc Effective date
ngay_het_hieu_luc Expiry date (empty if still in effect)
nguon_thu_thap Collection source (e.g. Công báo)
ngay_dang_cong_bao Official Gazette publication date
nganh Sector — Tài chính, Y tế, …
linh_vuc Legal field / sub-domain
co_quan_ban_hanh Issuing authority (551 unique bodies)
chuc_danh Signatory title — Chủ tịch, Bộ trưởng, …
nguoi_ky Signatory name
pham_vi Geographical scope
thong_tin_ap_dung Implementation note
tinh_trang_hieu_luc Effect status — Còn hiệu lực, Hết hiệu lực toàn bộ, …

content

Column Description
id Document ID (join key → metadata.id)
content_html Raw HTML body of the document

Note: Some documents in metadata do not have a corresponding entry in content because the portal only provides PDF scans for those documents (no HTML version available).

relationships

Column Description
doc_id Source document ID (join key → metadata.id)
other_doc_id Target document ID
relationship Edge label

Statistics

Documents by year

Document type distribution

Top issuing authorities

Data Collection

All data was scraped from vbpl.vn using a Scrapy crawler (included under crawler/). Metadata and cross-document relationships were extracted directly from the portal's structured pages.

cd crawler

scrapy crawl vbpl -a seed_file=data/ids.txt                          # basic
scrapy crawl vbpl -a seed_file=data/ids.txt -a proxy_file=proxies.txt  # with proxies
scrapy crawl vbpl -a seed_file=data/ids.txt -a resume=1               # resume

Output: data/raw.jsonl

Limitations

  • Coverage depends on what vbpl.vn has indexed; older or undigitized documents may be missing.
  • Effect status reflects the portal at crawl time and may lag behind real-world changes.
  • This is a snapshot, not a live mirror. Always cross-check with the portal for authoritative status.

Privacy

The dataset contains names of document signatories (public officials acting in their official capacity). No private citizen data is included.

Citation

@dataset{ngo_thinh_2026_vietnamese_legal,
  title     = {Vietnamese Legal Documents},
  author    = {Thịnh Ngô},
  year      = {2026},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/datasets/th1nhng0/vietnamese-legal-documents},
}

License

Vietnamese legal documents are public domain under the Law on Access to Information (No. 104/2016/QH13) and the Law on Promulgation of Legal Documents (No. 64/2025/QH15).

The compiled dataset (schema, processing, curation) is released under CC BY 4.0. Not a substitute for legal advice.

Note: The previous version (sourced from thuvienphapluat.vn) was discontinued following a content removal request. This is a fully rebuilt dataset sourced exclusively from vbpl.vn, the official Government Legal Document Portal. Full-text document content in Markdown is coming in a future release.

Downloads last month
20