tmquan/anle-toaan-gov-vn
Vietnamese Án lệ Corpus — anle.toaan.gov.vn 🇻🇳 Tóm tắt. Bộ dữ liệu các bản án + án lệ Việt Nam thu thập từ cổng anle.toaan.gov.vn của Tòa án nhân dân tối cao. Mỗi văn bản đi kèm markdown chuẩn hoá tiếng Việt và một lớp grounding mức câu (mỗi trích dẫn mang sentence_id + char span trỏ ngược vào markdown). Bộ dữ liệu là một phần của ViLA common-corpus và ship ba cấu hình HF theo chuẩn chung: documents (bảng chính) · embeddings (vector 4096-D Nemotron-3-Embed-8B) · reduces (toạ… See the full description on the dataset page: https://huggingface.co/datasets/tmquan/anle-toaan-gov-vn.
Vietnamese Án lệ Corpus — anle.toaan.gov.vn
🇻🇳 Tóm tắt. Bộ dữ liệu các bản án + án lệ Việt Nam thu thập từ cổng `anle.toaan.gov.vn` của Tòa án nhân dân tối cao. Mỗi văn bản đi kèm markdown chuẩn hoá tiếng Việt và một lớp grounding mức câu (mỗi trích dẫn mangsentence_id+ char span trỏ ngược vàomarkdown). Bộ dữ liệu là một phần của ViLA common-corpus và ship ba cấu hình HF theo chuẩn chung:documents(bảng chính) ·embeddings(vector 4096-D Nemotron-3-Embed-8B) ·reduces(toạ độ 2-D/3-D t-SNE & UMAP trong không gian chung khớp trên cả 6 bộ dữ liệu). Tên cột + giá trị phân loại là tiếng Anh; nội dung pháp lý giữ nguyên tiếng Việt. 🇬🇧 Summary. Vietnamese court judgments and precedents (án lệ) harvested from `anle.toaan.gov.vn` (Supreme People's Court portal). Every document carries a Vietnamese-normalised markdown body plus a sentence-level grounding layer (each citation carries a stablesentence_id+ char span back intomarkdown). This dataset is part of the ViLA common-corpus and ships three HF configs on the shared standard:documents(main table) ·embeddings(4096-D Nemotron-3-Embed-8B vectors) ·reduces(2-D/3-D t-SNE & UMAP coordinates in the shared corpus space fit jointly over all 6 datasets). Column names + categorical values are English; legal content stays Vietnamese.
Tổng quan · Overview
🇻🇳 Corpus mức văn bản của 1.844 bản án / án lệ Việt Nam, mỗi bản là một markdown tiếng Việt đã chuẩn hoá (NFC + chính tả hiện đại) với trích dẫn luật/án được neo về đúng câu nguồn. Nguồn: cổng công khai của Toà án nhân dân tối cao, thu thập 2026-07-21. Đây là một trong 6 bộ của ViLA common-corpus (anle, cbba, hdpl, phapdien, tnpl, tvpl-vbpl); config reduces đặt mọi văn bản của bộ này vào một không gian t-SNE/UMAP chung khớp trên toàn bộ 2,33 triệu điểm của cả 6 bộ.
🇬🇧 Document-level corpus of 1,844 Vietnamese judgments / precedents, each a normalised Vietnamese markdown (NFC + modern orthography) with law/case citations grounded to their source sentence. Source: the Supreme People's Court public portal, crawled 2026-07-21. This is one of the 6 datasets in the ViLA common-corpus (anle, cbba, hdpl, phapdien, tnpl, tvpl-vbpl); the reduces config places every document of this dataset into one shared t-SNE/UMAP space fit jointly over all 2.33M points across the 6 datasets.
Cấu hình · Configs
🇻🇳 Ba config, tất cả khoá theo `doc_name` (= id trong reduces). · 🇬🇧 Three configs, all keyed by `doc_name` (= id in reduces).
Lược đồ · Schema
documents — one row per judgment (primary key doc_name, 28 columns)
The two citation columns are first-class list<struct>:
78.5 % of law citations carry a `sentence_id` + `span` (anchored on Điều <article>; the rest are normative-by-number ids not found verbatim in the body).
embeddings — dense vectors (1,844 rows)
reduces — shared-corpus projections (long table, 7,376 rows)
Embeddings
🇻🇳 Config embeddings chứa vector 4096-D từ nvidia/Nemotron-3-Embed-8B-BF16 ("Nemotron-3" = v3), chia câu (windows + mean-pool + L2-norm) với prefix `passage:`, phục vụ qua vLLM (native Ministral kernel) trên GB10. Embed toàn văn bản (markdown) — đơn ngữ tiếng Việt.
🇬🇧 The embeddings config holds 4096-D vectors from nvidia/Nemotron-3-Embed-8B-BF16 (v3), sentence-boundary chunking (windows + mean-pool + L2-norm) with the model's `passage:` input prefix, served via vLLM (native Ministral kernel) on a GB10. Embedded field = whole-document markdown (monolingual VI).
Giảm chiều — không gian chung · Dimensionality reduction — the common corpus
🇻🇳 Config reduces là trung tâm của chuẩn common-corpus. Đây không phải phép chiếu riêng của bộ anle: toàn bộ 2,33 triệu embedding Nemotron-8B của cả 6 bộ (anle, cbba, hdpl, phapdien, tnpl, tvpl-vbpl) được khớp một lần vào một không gian t-SNE/UMAP chung (KHÔNG PCA). Bảng ở đây là lát cắt các dòng của bộ anle trong không gian đó, nên toạ độ so sánh được xuyên bộ dữ liệu.
🇬🇧 The reduces config is the centerpiece of the common-corpus standard. It is not an anle-only projection: all 2.33M Nemotron-8B embeddings across all 6 datasets (anle, cbba, hdpl, phapdien, tnpl, tvpl-vbpl) were fit once into one joint t-SNE/UMAP space (NO PCA). This table is the slice of anle's rows within that shared space, so coordinates are directly comparable across datasets.
- Long format — one row per
(id, method, dim): methods{tsne, umap}× dims{2, 3}= 4 rows per document × 1,844 docs = 7,376 rows. All rows present. - Shared fit — a single global t-SNE and a single global UMAP over the full 2.33M-point matrix; every dataset's card publishes its own slice of the same fit.
- No PCA — the shared reduction uses only t-SNE and UMAP; no
pcarows exist.
Trực quan hoá · Visualizations
Bản đồ corpus chung · Global corpus maps (all 6 datasets, shared space)
🇻🇳 Ba bản đồ dưới đây hiển thị toàn bộ common-corpus (cả 6 bộ) trong cùng không gian; các điểm của bộ anle là một tập con. · 🇬🇧 The three maps below show the whole common-corpus (all 6 datasets) in the shared space; anle's points are one subset.
UMAP — theo bộ dữ liệu · by dataset
t-SNE — theo bộ dữ liệu · by dataset
UMAP — theo ngôn ngữ · by language
Chiếu riêng của bộ anle · This dataset's own 2-D scatter (colored by legal category)
🇻🇳 Mỗi điểm là một văn bản, tô màu theo category; toạ độ lấy từ config reduces (lát cắt t-SNE/UMAP 2-D của bộ anle trong không gian chung). · 🇬🇧 Each dot is one document coloured by legal category; coordinates are anle's 2-D t-SNE/UMAP slice from the shared reduces config.
t-SNE — theo lĩnh vực · by legal category
UMAP — theo lĩnh vực · by legal category
Sơ đồ Sankey trích dẫn · Citation Sankey — category · subcategory → document → cited provision
🇻🇳 Mỗi luồng là một trích dẫn pháp luật: từ lĩnh vực · cấp xét xử của bản án, qua tài liệu, tới điều khoản được viện dẫn. · 🇬🇧 Each flow is one law-citation: from the judgment's legal category · court level, through the document, to the cited provision (Điều → Khoản → Điểm).
Bản tương tác · Interactive: `sankey-category-document-citation.html`
Gợi ý phân tích · Analysis pointers
🇻🇳 Từ toạ độ chung trong reduces: · 🇬🇧 From the shared reduces coordinates:
- kNN graph / retrieval — build a k-nearest-neighbour graph on the shared 2-D/3-D coords (or directly on the 4096-D
embeddings) to surface near-duplicate judgments and topical neighbours; the shared fit lets you pull neighbours from other ViLA datasets too. - Clustering — run HDBSCAN / k-means over the shared coords to recover legal-topic clusters, then cross-tab against
category/instance_level/court_level. - Cross-dataset geometry — because anle shares one fit with the other 5 datasets, you can measure where án-lệ rulings sit relative to statutes (phapdien / tvpl-vbpl), Q&A (hdpl) and terminology (tnpl) — e.g. overlap regions in the global maps above.
Cách dùng · How to use
from datasets import load_dataset
# documents (default) — one row per judgment, PK = doc_name
docs = load_dataset("tmquan/anle-toaan-gov-vn", split="train")
r = docs[0]
print(r["official_document_id"], r["category"], r["instance_level"], r["court"])
for c in r["citations_law"][:5]:
print(c["ref"], "→", list(c["sentence_id"])) # citation + its grounding sentence-id(s)
# per-config loading
docs_df = load_dataset("tmquan/anle-toaan-gov-vn", "documents", split="train").to_pandas()
emb_df = load_dataset("tmquan/anle-toaan-gov-vn", "embeddings", split="train").to_pandas()
red_df = load_dataset("tmquan/anle-toaan-gov-vn", "reduces", split="train").to_pandas()
# reduces is LONG + in the SHARED corpus space — slice one (method, dim) for one coord per doc
umap_2d = red_df[(red_df.method == "umap") & (red_df.dim == 2)]
joined = docs_df.merge(emb_df, on="doc_name").merge(
umap_2d.rename(columns={"id": "doc_name"}), on="doc_name")Cách thu thập + chuẩn hoá · How the corpus was built
🇻🇳 Pipeline theo phong cách NeMo Curator (download → parse → extract → embed → reduce). · 🇬🇧 NeMo-Curator-style pipeline (download → parse → extract → embed → reduce):
- Download — walks the paginated Nguồn án lệ + curated Án lệ listings and downloads each judgment PDF.
- Parse —
pypdffor digital PDFs, falling back tonvidia/nemoretriever-parsefor image-only scans. Output is NFC-normalised Vietnamesemarkdown. - Extract — regex + dictionary NER and an LLM pass populate the identity / classification / precedent / citation columns; citations are grounded back to their source sentence via a stable
sentence_id+ charspan. - Embed —
nvidia/Nemotron-3-Embed-8B-BF16(4096-D), sentence-boundary chunking - mean-pool + L2-norm with the
passage:prefix, served via vLLM on a GB10. - Reduce (shared) — this dataset's embeddings are concatenated with the other 5 ViLA datasets and reduced jointly with t-SNE and UMAP at both 2-D and 3-D (no PCA), producing the shared-space
reducestable.
Captured: 2026-07-21T16:46:56.048226+00:00.
Hạn chế & lưu ý · Limitations & caveats
- 🇻🇳 Chỉ 9 án lệ chính thức. 1.835 dòng còn lại là nguồn án lệ (bản án nguồn). · 🇬🇧 Only 9 official án lệ; the other 1,835 rows are nguồn án lệ (source rulings), not binding precedents.
- 🇻🇳 Nhãn suy diễn (regex + LLM).
category,instance_level,court_level, … sinh bằng regex + LLM — còn nhiễu; lọc bằngconfidence+flags. · 🇬🇧 Heuristic labels (regex + LLM) — expect residual noise; filter withconfidence(0.5–1.0) andflags. - 🇻🇳 Neo trích dẫn chưa đầy đủ. 78.5 % trích dẫn luật có
sentence_id+span. · 🇬🇧 Partial citation grounding — 78.5 % of law citations carry asentence_id+span. - 🇻🇳 Toạ độ `reduces` là phép chiếu chung, không phải khoảng cách ngữ nghĩa chính xác — dùng để trực quan/khám phá, truy hồi nên dùng vector 4096-D trong
embeddings. · 🇬🇧 `reduces` coords are a shared projection, not exact semantic distances — use them for visualization/exploration; for retrieval use the 4096-Dembeddings.
Dữ liệu cá nhân · Personal data & anonymization
Bản án, quyết định trên cổng của Toà án nhân dân tối cao được mã hoá thông tin cá nhân trước khi công bố theo Nghị quyết 03/2017/NQ-HĐTP: tên đương sự được thay bằng ký hiệu, địa chỉ và số giấy tờ được rút gọn. — Judgments on the Supreme People's Court portal are anonymized by the courts before publication under Resolution 03/2017/NQ-HĐTP: party names are replaced with coded forms, addresses and ID numbers truncated.
- Names of judges, prosecutors and court clerks (public officials), case numbers and dates remain in the text as published.
- Anonymization is applied by the issuing court and can be incomplete. This dataset redistributes the portal text verbatim — no additional anonymization and no de-anonymization.
- Do not attempt to re-identify anonymized parties. Downstream processing of personal data must comply with Vietnam's personal-data framework (Decree 13/2023/NĐ-CP) and any law applicable to you (e.g. GDPR).
Giấy phép & trích dẫn · License & citation
Văn bản gốc được Toà án nhân dân tối cao công bố công khai. Theo Điều 15 Luật Sở hữu trí tuệ, văn bản tư pháp không thuộc phạm vi bảo hộ quyền tác giả, nên giấy phép CC-BY-4.0 ở đây chỉ áp dụng cho phần tuyển chọn, cấu trúc hoá, chú giải và embedding do bộ dữ liệu này bổ sung. — Under Article 15 of Vietnam's Intellectual Property Law, judicial documents are excluded from copyright, so the CC-BY-4.0 grant here covers only the curation, structuring, annotations and embeddings added by this distribution — not the underlying court texts. Please check the source-website terms of use before commercial redistribution.
@misc{anle_2026,
title = {Vietnamese Án lệ + Bản án Corpus (anle.toaan.gov.vn)},
author = {TMQuan},
year = {2026},
howpublished = {\url{https://huggingface.co/datasets/tmquan/anle-toaan-gov-vn}},
note = {Part of the ViLA common-corpus. Sentence-grounded citations folded into the documents table, 4096-D Nemotron-3-Embed-8B embeddings, and shared-space 2-D/3-D t-SNE/UMAP projections over the Vietnamese án-lệ portal.}
}
@misc{anle_toaan_2026,
title = {Vietnamese Án lệ + Bản án Corpus},
author = {{Án lệ — Tòa án nhân dân tối cao}},
year = {2026},
howpublished = {\url{https://anle.toaan.gov.vn/}},
note = {Official portal for Vietnamese án lệ (precedents) + nguồn án lệ, published by the Supreme People's Court (Tòa án nhân dân tối cao).}
}