# UTS_VLC vs. th1nhng0/vietnamese-legal-documents

A comparison of the **UTS_VLC** corrected `2026` split against
[`th1nhng0/vietnamese-legal-documents`](https://huggingface.co/datasets/th1nhng0/vietnamese-legal-documents),
another Hugging Face corpus of Vietnamese legal documents. Both ultimately derive from the
national legal database **vbpl.vn** (Bộ Tư pháp), which makes them complementary rather than
competing: one is a *broad raw corpus*, the other a *narrow curated one*.

> Snapshot date of this comparison: 2026-06. Figures for th1nhng0 are from its `metadata` config.
> th1nhng0 was last updated on Hugging Face on **2026-04-27**, which is why some of its in-force
> status labels lag behind the current vbpl state (see the in-force notes below).

## At a glance

| | **UTS_VLC** (`2026` corrected) | **th1nhng0/vietnamese-legal-documents** |
|---|---|---|
| Focus | Laws & Codes only (Luật, Bộ luật) | All document types (Quyết định, Thông tư, Nghị định, …) |
| Documents | **306** in-force docs (Constitution + 305 Laws/Codes) | **153,420** documents (`metadata`); 178,665 with full text (`content`) |
| Laws/Codes | 305 (curated in-force snapshot) | **690** (incl. historical Sắc lệnh / LCT era) |
| Full text | Cleaned **Markdown** (~24 MB) | Raw **HTML** (`content_html`, ~3.2 GB) |
| Status filter | In-force only (CHL ∪ HHL1P) | All statuses (incl. expired) |
| Metadata | `id`(Số hiệu)/title/type/content + separate sources file | Rich `metadata` config (dates, sectors, signers, status) |
| Relationships | Amendment links via vbpl `lược đồ` (in `vn_law.sqlite`) | Dedicated `relationships` config (897,890 edges) |
| Provenance | Per-doc links to **6 official/reference sources** + `vn_law.sqlite` | Single source (vbpl.vn snapshot) |
| Verification | De-duplicated + validated vs vbpl (issue #1035 fix) | Raw snapshot |
| License | MIT | CC BY 4.0 |
| Last updated (HF) | **2026-06-01** | **2026-04-27** |

## Coverage overlap (Laws & Codes)

Joining the two corpora by **Số hiệu** (standard `NN/YYYY/QH…` form):

| Set | th1nhng0 | UTS_VLC |
|---|---|---|
| Laws/Codes (parseable Số hiệu) | 496 | 508 (full catalogue) |
| **In-force** Laws/Codes | **308** | **308** |

Both corpora independently arrive at **308 in-force Laws/Codes** — unsurprising, as both
track vbpl.vn. Intersecting the **UTS_VLC corrected `2026` split (305 laws)** with th1nhng0:

- **301 / 305** of UTS_VLC's laws are also present in th1nhng0 (99%).
- **4** are in UTS_VLC but **not** in th1nhng0 — all very recent, not yet in th1nhng0's snapshot:
  `07/2026/QH16`, `112/2025/QH15`, `124/2025/QH15`, `07/2022/QH15`.
- **195** QH-coded laws exist in th1nhng0 but not in UTS_VLC's curated split — these are mostly
  **expired** laws (UTS_VLC's `2026` split is an in-force snapshot by design).

For **in-force** laws the two corpora now agree almost exactly — **308 in-force Laws/Codes each**:
- The only two active laws th1nhng0 had that UTS_VLC genuinely lacked — **Luật Căn cước**
  (`26/2023/QH15`) and the VAT-amendment law (`149/2025/QH15`) — have been **added**, bringing
  UTS_VLC's in-force catalogue in line with th1nhng0's.
- The **7** remaining "th1nhng0-only in-force" laws (`07/2007/QH12`, `07/2012/QH13`, `09/1998/QH10`,
  `26/2004/QH11`, `31/2004/QH11`, `58/2005/QH11`, and `116/2025/QH15` which takes effect 2026-07-01)
  are in fact **expired or not-yet-effective** per a live vbpl check — th1nhng0's status labels come
  from an older snapshot, whereas UTS_VLC's are current.
- **7** in-force laws are in UTS_VLC but not in th1nhng0 — all very recent 2025/2026 laws.

## Active Laws & Codes (by type)

Restricting to **in-force** documents and splitting Luật (Law) from Bộ luật (Code):

| Type | th1nhng0 (active) | UTS_VLC catalogue (in-force) | UTS_VLC `2026` split |
|---|---:|---:|---:|
| Luật (Law)     | 315 | 314 | 299 |
| Bộ luật (Code) | 6   | 6   | 6   |
| **Total**      | **321** | **320** | **305** |

Both corpora independently identify exactly **6 active Codes** (Bộ luật): Civil, Criminal,
Civil Procedure, Criminal Procedure, Maritime, and Labor. The active-Law counts agree to within
~0.3% (315 vs 314). UTS_VLC's `2026` split carries 299 Laws; the gap to its own catalogue (314) is
the residual that could not be re-sourced — very recent 2025/2026 laws plus a few with
non-standard Số hiệu — documented in the issue #1035 work.

## Key differences

**Scope.** th1nhng0 is a *whole-corpus* snapshot of vbpl.vn (153K+ documents of every type, plus
518K legacy rows and a relationship graph). UTS_VLC is deliberately narrow: only the **Laws and
Codes that are currently in force**, as a clean training/evaluation corpus.

**Text format & quality.** th1nhng0 ships raw `content_html` — faithful but requires HTML cleaning
and contains markup/boilerplate. UTS_VLC ships pre-cleaned **Markdown** (`# title` + `**Số hiệu:**`
+ body), de-duplicated to one entry per Số hiệu, and validated against the official text (this is
the issue [#1035](https://github.com/undertheseanlp/underthesea/issues/1035) remediation).

**Provenance.** UTS_VLC attaches, per document, **direct links to six sources** — official
(vbpl.vn, congbao.chinhphu.vn, vanban.chinhphu.vn, vietlaw.quochoi.vn) and reference
(thuvienphapluat.vn, luatvietnam.vn) — in `metadata/2026_sources.json`, plus the full reference
catalogue in `database/vn_law.sqlite`. th1nhng0 records a single collection source.

## When to use which

- **th1nhng0** — large-scale pretraining, retrieval over *all* document types, document-relationship
  modelling, or when historical/expired documents and raw HTML are wanted.
- **UTS_VLC (`2026`)** — a clean, verified, in-force **Law/Code** corpus for fine-tuning, evaluation,
  legal-QA, or any task that needs trustworthy, de-duplicated full text with rich provenance.

The two are complementary: th1nhng0 for breadth, UTS_VLC for a curated, audited in-force slice.

## Reproducing this comparison

Numbers above are produced by `research/compare_th1nhng0.py` (joins both corpora by Số hiệu);
the raw figures and unique-law lists are in `research/overlap_th1nhng0.json`.