vbpl-vn-legal-corpus
收藏资源简介:
VBPL.vn越南法律语料库是一个从越南司法部国家法律数据库(vbpl.vn)爬取并整理的越南中央级法律文本集合,旨在为法律信息检索、问答、文本分类以及图分析等任务提供结构化、高质量的越南语法律资源。数据内容涵盖越南中央层级(如国会、政府、部委等)发布的法律文件,包括法律、决议、法令、通知等多种类型。数据集核心部分是一个包含约4.2万份法律文件的主表(vanban.parquet),每份文件对应约50个字段,详细记录文件的身份信息(如文号、标题、类型)、发布机构、相关日期(颁布、生效、失效)、效力状态、领域分类以及文本内容。此外,数据集还提供了按“条/款”级别划分的文本块(chunks.parquet),共计约44.7万个块,平均长度约600个词元,适合用于检索增强生成(RAG)等场景。同时,数据集构建了一个法律文件间的引用关系图,图结构通过edges.jsonl文件定义,包含约3.7万条边,描述了14种不同类型的关系(如引用、修订、替代、废止、基于、合并等),可用于分析法律文件之间的网络关联。数据集文件以Parquet和JSONL格式提供,便于使用Pandas等工具进行高效加载和处理,适用于法律信息检索、智能问答系统、法律文本分类、法律知识图谱构建以及法律人工智能研究等多个领域。
The VBPL.vn Vietnamese Legal Corpus is a collection of central-level Vietnamese legal texts crawled and organized from the National Legal Database (vbpl.vn) of the Ministry of Justice of Vietnam. It is designed to provide structured, high-quality Vietnamese legal resources for tasks including legal information retrieval, question answering, text classification, and graph analysis. The dataset covers legal documents issued by Vietnamese central authorities such as the National Assembly, the Government, and ministerial bodies, encompassing various types like laws, resolutions, decrees, and notices. The core component of the dataset is a main table (vanban.parquet) containing approximately 42,000 legal documents. Each document corresponds to around 50 fields, which detailedly record the document's identification information (e.g., document number, title, type), issuing institution, relevant dates (promulgation, effective, and expiry), validity status, domain classification, and full text content. Additionally, the dataset provides text chunks segmented at the "article/clause" level (chunks.parquet), with a total of approximately 447,000 chunks and an average length of about 600 tokens. These chunks are suitable for scenarios such as Retrieval-Augmented Generation (RAG). Furthermore, the dataset constructs a citation relationship graph among legal documents, which is defined in the edges.jsonl file. This graph contains roughly 37,000 edges, describing 14 distinct types of relationships including citation, revision, replacement, repeal, basis, merger, and others, enabling analysis of network associations between legal documents. The dataset files are provided in Parquet and JSONL formats, facilitating efficient loading and processing with tools such as Pandas. It is applicable to multiple fields including legal information retrieval, intelligent question answering systems, legal text classification, legal knowledge graph construction, and legal artificial intelligence research.
VBPL.vn — 越南法律语料库(Vietnamese Legal Corpus)
基本信息
- 数据集名称: VBPL.vn Vietnamese Legal Corpus
- 语言: 越南语 (vi)
- 许可协议: CC-BY-SA-4.0
- 数据集规模: 1K < n < 10K
- 任务类型: 文本检索、问答、文本分类
- 标签: 法律、越南语、RAG、图
数据来源
- 源网站: vbpl.vn(越南司法部国家法律数据库)
- API:
https://vbpl-bientap-gateway.moj.gov.vn/api - 范围: 中央级法律文本(国会、政府、各部委等)
数据文件结构
主数据文件 (data/ 目录)
| 文件 | 格式 | 描述 |
|---|---|---|
vanban.parquet |
Parquet | 主表,每行对应一份法律文本(约50列) |
vanban.jsonl |
JSONL | 与 vanban.parquet 等价的 JSONL 格式 |
nodes.jsonl |
JSONL | 图数据节点,每行一个文档的核心字段 |
edges.jsonl |
JSONL | 图数据边,约3.7万条引用关系 |
vanban_process.parquet |
Parquet | 文本清洗后的中间结果(可选) |
chunks.parquet |
Parquet | 按“条/款”分割的文本块,约45万块(推荐用于查询) |
chunks.jsonl |
JSONL | 与 chunks.parquet 等价的 JSONL 格式 |
provision_relations.jsonl |
JSONL | 条款级别的关系(修改关系) |
报告文件 (reports/ 目录)
stats_all.md:整个语料库的统计报告stats_<loai>.md:按法律文本类型分类的统计报告charts_all/:全局图表目录charts_<loai>/:按类型分类的图表目录
主要 Schema
vanban.parquet 字段分组
| 分组 | 主要字段 |
|---|---|
| 标识 | id, so_ky_hieu, title, loai_van_ban, loai_van_ban_code |
| 机构 | co_quan_ban_hanh, organization_id, organization_name |
| 日期 | ngay_ban_hanh, ngay_co_hieu_luc, ngay_het_hieu_luc(含 _iso 格式) |
| 状态 | tinh_trang_hieu_luc, linh_vuc, nganh, doc_status, lang |
| 标记 | is_lw, is_consolidated, is_constitution, is_administrative 等 |
| 关系(JSON) | references_json, document_issues_json, document_related_list_json, provision_tree_json |
| 文本 | text_clean, has_text |
edges.jsonl 图数据格式
每行表示两个法律文本之间的关系: json { "source_doc_id": "32801", "source_so_ky_hieu": "Không số", "target_doc_id": "96118", "target_so_ky_hieu": "96/2015/QH13", "target_title": "Luật Trưng cầu ý dân...", "reference_type": 10, "relation_type": "CITES", "source": "meta.references" }
关系类型(14种): CITES, AMENDS, REPLACES, REPEALS, BASED_ON, CONSOLIDATES 等
使用示例
加载表格数据
python import pandas as pd df = pd.read_parquet(hf://datasets/Monmoonluna/vbpl-vn-legal-corpus/data/vanban.parquet)
加载文本块(适合 RAG)
python chunks = pd.read_parquet(hf://datasets/Monmoonluna/vbpl-vn-legal-corpus/data/chunks.parquet)
约 447k 个块,平均约 600 token
构建图
python import networkx as nx edges = pd.read_json(hf://datasets/Monmoonluna/vbpl-vn-legal-corpus/data/edges.jsonl, lines=True) G = nx.DiGraph() for _, e in edges.iterrows(): G.add_edge(e[source_so_ky_hieu], e[target_so_ky_hieu], relation=e[relation_type])
许可说明
- 越南法律文本属于公共领域(public domain)
- 代码和脚本以 CC-BY-SA-4.0 许可证发布
代码仓库
完整爬取和处理代码见:https://github.com/Monmoonluna/LEGALSEARCHVN_LOCALAI




