CoolFace
Datasetpublic

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.

sourceHugging Facecc-by-4.0updated 5d agoView on Hugging Face
10likes8kdownloads
Dataset Card

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ạ độ 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 stable sentence_id + char span back into markdown). 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.

Chỉ số · MetricGiá trị · Value
Văn bản · Documents (documents, PK doc_name)1,844
Trích dẫn luật · Law citations (sentence-grounded)29,783 (78.5 % carry a sentence_id + span)
Trích dẫn bản án · Case citations4,238
Án lệ chính thức · Official án lệ (is_precedent)9 (the other 1,835 rows are nguồn án lệ source rulings)
Ngôn ngữ · LanguageVietnamese (vi) content; English column names + categorical enums
Mô hình embedding · Embedding modelnvidia/Nemotron-3-Embed-8B-BF16 (4096-d, config embeddings)
Reduces (shared space)1,844 docs × 2 methods (t-SNE, UMAP) × 2 dims (2-D, 3-D) = 7,376 rows
Trung vị trang · Median pages / doc9
Trung vị ký tự · Median chars / doc20,909
Nguồn · Source<https://anle.toaan.gov.vn/> — Supreme People's Court of Vietnam
Thu thập lúc · Crawled2026-07-21

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).

ConfigSplitSố dòng · RowsFile(s)Nội dung · Content
documents (default)train1,844documents-*.parquetOne row per judgment; citations inline + sentence-grounded
embeddingstrain1,844embeddings-*.parquet4096-D Nemotron-3-Embed-8B dense vectors
reducestrain7,376reduces.parquetShared-corpus 2-D/3-D t-SNE & UMAP coordinates

Lược đồ · Schema

documents — one row per judgment (primary key doc_name, 28 columns)

ColumnTypeNotes
doc_namestringPrimary key — TAND portal id; every config joins on it.
sourcestringSource tag (portal identifier).
web_urlstringPortal HTML page for the judgment.
pdf_urlstringSource PDF binary.
official_document_idstringPrinted document id, e.g. 237/2022/HS-PT.
official_document_id_normalizedstringHyphen-normalised id (for joins / citation graph).
numberdoubleSequence number parsed from the id.
yeardoubleYear parsed from the id.
codestringVietnamese ký hiệu (document-type code).
id_sourcestringHow the id was resolved: regex \audit_corrected.
categorystringLegal domain (English enum): Civil / Criminal / Administrative / Commercial / Marriage & Family / Labor.
instance_levelstringProcedural stage (English enum): Appellate / Cassation / First-instance / Retrial.
courtstringIssuing court name (Vietnamese, verbatim).
court_levelstringCourt tier (English enum): High / Supreme / Provincial / District; ~98.9 % filled.
issued_datestringJudgment date (ISO where parseable).
date_sourcestringHow the date was resolved: regex \audit_corrected.
precedent_numberstringÁn lệ number (e.g. 44/2021/AL); non-null on the 9 official án lệ.
is_precedentbooltrue on the 9 official án lệ, false on the source rulings.
citations_lawlist&lt;struct&gt;Law citations (struct fields below). 29,783 total.
citations_caselist&lt;struct&gt;Case citations (struct fields below). 4,238 total.
citations_sourcestringExtraction path: llm \llm+section \regex.
num_law_citationsint64Count of citations_law.
num_case_citationsint64Count of citations_case.
markdownstringFull judgment body — NFC-normalised Vietnamese markdown.
markdown_charsint64Character count of markdown.
num_pagesint64Source PDF page count.
confidencedoubleParse/extraction confidence (0.5–1.0).
flagslist&lt;string&gt;QA flags (empty on ~99 % of rows).

The two citation columns are first-class list<struct>:

ColumnStruct fields
citations_law (29,783)kind (provision\document) · `ref` (VI, ordered large→small Chương→Mục→Điều→Khoản→Điểm + law + năm) · chapter,section,article,clause,point · law_type,law_name (VI) · id,year · `sentence_id` ({doc_name}#{sent_idx}) · `span` (char offsets [[start,end],…] into markdown)
citations_case (4,238)id,number,year,code · role (first-instance\appellate\cassation\protest) · domain,level · sentence_id,span

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)

ColumnTypeNotes
doc_namestringJoin key to documents.
embeddinglist&lt;float64&gt;4096-d dense vector (L2-normalised).
embedding_dimint644096.
embedding_model_idstringnvidia/Nemotron-3-Embed-8B-BF16.

reduces — shared-corpus projections (long table, 7,376 rows)

ColumnTypeNotes
idstringJoin key to documents.doc_name.
datasetstringAlways anle (identifies the source dataset in the shared space).
languagestringAlways vi.
methodstringtsne \umap.
dimint642 or 3.
coordslist&lt;float64&gt;Projected coordinates in the shared space, length = dim.

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 reducestrung 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 pca rows 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

[image]

t-SNE — theo bộ dữ liệu · by dataset

[image]

UMAP — theo ngôn ngữ · by language

[image]

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

[image]

UMAP — theo lĩnh vực · by legal category

[image]

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).

[image]

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

python
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):

  1. 1.Download — walks the paginated Nguồn án lệ + curated Án lệ listings and downloads each judgment PDF.
  2. 2.Parsepypdf for digital PDFs, falling back to nvidia/nemoretriever-parse for image-only scans. Output is NFC-normalised Vietnamese markdown.
  3. 3.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 + char span.
  4. 4.Embednvidia/Nemotron-3-Embed-8B-BF16 (4096-D), sentence-boundary chunking
  5. 5.mean-pool + L2-norm with the passage: prefix, served via vLLM on a GB10.
  6. 6.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 reduces table.

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ằng confidence + flags. · 🇬🇧 Heuristic labels (regex + LLM) — expect residual noise; filter with confidence (0.5–1.0) and flags.
  • 🇻🇳 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 a sentence_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-D embeddings.

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.

bibtex
@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).}
}