vbpl-vn
收藏资源简介:
越南国家法律数据库(vbpl.vn)数据集是一个文档级的越南法律文本语料库,从越南司法部运营的vbpl.vn门户网站收集而来。该数据集全面覆盖了越南中央和地方两个层级的法律文件,包括法律、法令、决定、决议、指示、通知、联合通知、统一文本、敕令、公文等多种文档类型。数据集包含158,822个法律文档,其中地方文件(dia_phuong)占65.7%(104,345个),中央文件(trung_uong)占34.3%(54,477个)。每个文档行都包含经过标准化处理的越南语Markdown正文(采用NFC规范化和1984年后的现代正字法)以及完整的层次结构层:文档→章节→段落→句子,每个结构单元都带有稳定的ID和字符跨度信息,可精确映射回Markdown文本。数据集提供了丰富的元数据字段,包括文档标识(doc_name)、范围(scope)、标题(title)、文档类型(doc_type和legal_type)、法律领域(legal_area)、文号(so_hieu)、发布日期(ngay_ban_hanh)、发布机构(co_quan_ban_hanh)、摘要(trich_yeu)等。正文内容主要来自HTML解析(占92.8%),少数文档只有元数据而无正文(占7.2%)。数据集还包含详细的统计信息,如字符长度、页面数、章节数、段落数、句子数等。此外,数据集提供了完整的层次结构JSON(structure_json)和实体提取JSON(extracted_json)。除了主文档数据集外,还包含两个配套阶段:embed阶段提供2048维密集向量表示,reduce阶段提供2D投影和聚类ID。该数据集适用于多种自然语言处理任务,包括文本分类、文本检索、问答、文本生成、摘要等,特别适合法律领域的AI应用和研究。
The Vietnam National Legal Database (vbpl.vn) dataset is a document-level Vietnamese legal text corpus collected from the vbpl.vn portal operated by the Ministry of Justice of Vietnam. This dataset comprehensively covers legal documents at both central and local levels in Vietnam, including various document types such as Laws, Decrees, Decisions, Resolutions, Instructions, Circulars, Joint Circulars, Uniform Texts, Ordinances, and Official Documents. The dataset contains 158,822 legal documents, of which local documents (dia_phuong) account for 65.7% (104,345) and central documents (trung_uong) account for 34.3% (54,477). Each document entry contains standardized Vietnamese Markdown body text (using NFC normalization and modern orthography post-1984) and a complete hierarchical structure: Document → Chapter → Paragraph → Sentence. Each structural unit carries a stable ID and character span information that can be accurately mapped back to the Markdown text. The dataset provides rich metadata fields, including document identifier (doc_name), scope, title, document type (doc_type and legal_type), legal area (legal_area), document number (so_hieu), issuance date (ngay_ban_hanh), issuing authority (co_quan_ban_hanh), abstract (trich_yeu), and others. The main body text is mostly derived from HTML parsing (92.8%), while a small portion of documents only have metadata without body text (7.2%). The dataset also includes detailed statistical information, such as character length, number of pages, number of chapters, number of paragraphs, number of sentences, and others. In addition, the dataset provides complete hierarchical structure JSON (structure_json) and entity extraction JSON (extracted_json). Besides the main document dataset, it also includes two supporting stages: the embed stage provides 2048-dimensional dense vector representations, and the reduce stage provides 2D projections and cluster IDs. This dataset is applicable to a variety of natural language processing tasks, including text classification, text retrieval, question answering, text generation, summarization, etc., and is particularly suitable for AI applications and research in the legal field.
数据集:越南国家法律数据库 (vbpl.vn)
- 语言:越南语 (
vi) - 许可协议:Creative Commons Attribution 4.0 International (CC-BY-4.0)
- 数据集大小:约 158,822 份文档 (100K < n < 1M)
- 任务类别:文本分类、文本检索、问答、文本生成、摘要
数据集内容
该数据集是越南国家法律数据库的文档级语料库,数据来源于由越南司法部运营的 vbpl.vn 门户网站。它收录了从中央(国会、政府、各部委)和地方(63个省市的人民议会/人民委员会)两级权力机构颁布的各类法律文件,包括法律、法令、议定、通知、决定、决议、指令等。
每条数据记录代表一份法律文件,包含:
- 标准化 Markdown 文本:经过越南语规范化处理(NFC标准化 + 1984年后的现代正字法)。
- 完整的分层结构:文档 → 章节 → 段落 → 句子,每个单元都带有稳定的ID及其在Markdown中的字符跨度。
数据规模与统计
| 指标 | 数值 |
|---|---|
| 文档总数 | 158,822 |
| 文档中位数长度 | 5,111 字符 |
| 文档中位数段落数 | 1 |
| 文档中位数句子数 | 17 |
| 带有结构化层级信息的文档数 | 158,822 |
| 带有下载附件的文档数 | 0 |
文本主体来源:body_html |
147,317 (92.8%) |
文本主体来源:shell_html (无正文) |
11,505 (7.2%) |
数据结构与模式
数据集包含三个配置(config),分别对应不同的数据处理阶段:
-
documents(默认):主表,每行一份文档及其完整信息。- 识别与元数据字段:
doc_name,item_id,scope(central/provincial),source,source_url,api_url,title,doc_type(蛇形命名法英文slug),legal_type(越南语全称),legal_area(法律领域),so_hieu(文书编号列表),ngay_ban_hanh(发布日期),year,co_quan_ban_hanh(发布机构),trich_yeu(摘要)。 - 正文与统计字段:
markdown(规范化后的Markdown文本),num_pages,num_sections,num_paragraphs,num_sentences,char_len,text_hash(SHA-256哈希),parser_model,parser_runtime,body_source,parsed_at。 - 层级与实体字段:
structure_json,extracted_json,file_paths_json。
- 识别与元数据字段:
-
embed:包含 147,317 个可嵌入文档的稠密向量。- 使用
nvidia/llama-nemotron-embed-1b-v2模型生成 2048维 向量。 - 字段包括:
doc_name,text_hash,embedding,embedding_dim,embedding_model_id,embedding_text_hash,embedding_chunks_used,embedding_chunking。
- 使用
-
reduce:包含 2维 投影和聚类ID,用于可视化和分析。
数据分布概览
层级范围 (Scope)
- 地方 (
dia_phuong):104,345 份 (65.7%) - 中央 (
trung_uong):54,477 份 (34.3%)
主要文档类型 (Top 12 by doc_type)
英文Slug (doc_type) |
越南语全称 (legal_type) |
数量 | 占比 |
|---|---|---|---|
quyet_dinh |
Quyết định (决定) | 84,970 | 53.5% |
nghi_quyet |
Nghị quyết (决议) | 26,091 | 16.4% |
thong_tu |
Thông tư (通知) | 16,212 | 10.2% |
ban_dich_van_ban |
Bản dịch văn bản (文档翻译) | 10,576 | 6.7% |
chi_thi |
Chỉ thị (指示) | 7,908 | 5.0% |
nghi_dinh |
Nghị định (议定) | 4,690 | 3.0% |
thong_tu_lien_tich |
Thông tư liên tịch (联合通知) | 3,393 | 2.1% |
van_ban_hop_nhat |
Văn bản hợp nhất (合并文档) | 1,792 | 1.1% |
sac_lenh |
Sắc lệnh (法令) | 980 | 0.6% |
cong_van |
Công văn (公文) | 708 | 0.4% |
luat |
Luật (法律) | 580 | 0.4% |
lenh |
Lệnh (命令) | 376 | 0.2% |
主要法律领域 (Top 20 by legal_area)
约 71% 的文档被标记为 Chưa phân loại (未分类)。已分类的主要领域包括:
Đất đai (土地), Quản lý thuế, phí, lệ phí và thu khác của ngân sách nhà nước (国家预算的税收、费用征管), Lĩnh vực giá (价格领域), Tổ chức- Biên chế (组织与编制), Lao động, tiền lương, tiền công (劳动、工资) 等。
主要发布机构 (Top 15)
| 发布机构 | 数量 | 占比 |
|---|---|---|
| Bộ Tài chính (财政部) | 11,793 | 7.4% |
| Thủ tướng Chính phủ (政府总理) | 7,849 | 4.9% |
| Chính phủ (政府) | 7,168 | 4.5% |
| UBND Thành phố Hồ Chí Minh (胡志明市人民委员会) | 5,312 | 3.3% |
| Bộ Nông nghiệp và Phát triển nông thôn (农业与农村发展部) | 2,526 | 1.6% |
| UBND Tỉnh Lào Cai (老街省人民委员会) | 2,497 | 1.6% |
| UBND Tỉnh Nghệ An (乂安省人民委员会) | 2,477 | 1.6% |
| UBND tỉnh Bình Phước (平福省人民委员会) | 2,410 | 1.5% |
| Ngân hàng Nhà nước Việt Nam (越南国家银行) | 2,198 | 1.4% |
| UBND Thành phố Hà Nội (河内市人民委员会) | 2,123 | 1.3% |
| UBND thành phố Đà Nẵng (岘港市人民委员会) | 2,018 | 1.3% |
| UBND tỉnh Bà Rịa - Vũng Tàu (巴地头顿省人民委员会) | 1,956 | 1.2% |
| Bộ Giao thông vận tải (交通运输部) | 1,925 | 1.2% |
| UBND Thành phố Hải Phòng (海防市人民委员会) | 1,885 | 1.2% |
| UBND Tỉnh Gia Lai (嘉莱省人民委员会) | 1,765 | 1.1% |
数据来源
文档内容主要来自门户网站的API返回的HTML正文 (body_html),少部分来自仅包含元数据且无正文的旧版文档 (shell_html)。管道优先处理下载的附件(PDF/DOC/DOCX)。
使用示例 (Python)
python import json from datasets import load_dataset
ds = load_dataset("tmquan/vbpl-vn", split="train") row = ds[0] print(row["doc_type"], row["so_hieu"], row["ngay_ban_hanh"]) print(row["title"])
structure = json.loads(row["structure_json"]) for sec in structure.get("sections", []): print(sec["kind"], sec["label"])




