lianghsun's picture
Add comprehensive dataset card
57b3f81 verified
|
Raw History Blame Contribute Delete
6.96 kB
metadata
license: apache-2.0
language:
  - zh
task_categories:
  - text-generation
tags:
  - legal
  - Taiwan
  - ROC
  - zh-tw
  - law-article
  - pretrain
  - cpt
pretty_name: 中華民國台灣法規全文後處理資料集
size_categories:
  - 10K<n<100K
dataset_info:
  features:
    - name: text
      dtype: string
    - name: name
      dtype: string
    - name: level
      dtype: string
    - name: abandon_note
      dtype: string
    - name: modified_date
      dtype: string
    - name: api_updated_date
      dtype: string
  splits:
    - name: train
      num_examples: 11462
configs:
  - config_name: default
    data_files:
      - split: train
        path: train.jsonl

Dataset Card for tw-processed-law-ctx

tw-processed-law-ctx 是一個中華民國(台灣)法規全文之後處理資料集,合計 11,462 筆。相較於 tw-processed-law-article(以單一條文為單位),本資料集將「同一法規之所有條文」合併為單一 text,提供整部法規之完整上下文,適合作為繁中法律 LLM 之持續預訓練(CPT)素材。

Dataset Details

Dataset Description

以「條文為單位」之語料雖便於精確查詢,但模型在訓練時難以學到整部法規之章節結構與條文之間之關聯。本資料集將每一部法規之所有條文依序合併為單一長文本,保留:

  • 法規名稱(含章節標題);
  • 所有條文之條號與本文;
  • 該法規最近修正日期與 API 更新日期;
  • 若法規已廢止,額外提供 abandon_note 欄位。

每筆亦同時附帶 level(法規位階:憲法 / 法律 / 命令 / 廢止)作為篩選依據。

Dataset Sources

Uses

Direct Use

本資料集主要設計用於:

  • 繁體中文法律 LLM 之持續預訓練(CPT);
  • 訓練模型理解整部法規之章節結構與條文之間之關聯;
  • 作為法律語料 pipeline 中之「長上下文」組成部分;
  • 與條文單位之語料(如 tw-processed-law-article、tw-structured-law-article)互補。

Out-of-Scope Use

本資料集不適用於下列用途:

  • 作為正式法律諮詢之依據;
  • 作為條文單位之精準查詢語料(合併後難以定位單一條號);
  • 作為非中華民國法律體系之訓練資料。

Dataset Structure

{
  "text": "中華民國憲法  第 一 章 總綱\n中華民國憲法 第 1 條 中華民國基於三民主義...\n中華民國憲法 第 2 條 中華民國之主權屬於國民全體。\n...",
  "name": "中華民國憲法",
  "level": "憲法",
  "abandon_note": "",
  "modified_date": "19470101",
  "api_updated_date": "2024/1/12 上午 12:00:00"
}
欄位 型別 說明
text string 整部法規之所有條文合併後之連續文本
name string 法規名稱
level string 法規位階(憲法 / 法律 / 命令 / 廢止)
abandon_note string 廢止備註(若法規已廢止)
modified_date string 最近修正日期
api_updated_date string API 更新時間
統計項目 數值
總筆數 11,462
切分 無(使用者自行切分)

Dataset Creation

Curation Rationale

tw-processed-law-article 以條文為單位切分,雖便於查詢,但在 CPT 階段無法提供長上下文。本資料集將同一法規之條文合併,使模型能學到整部法規之章節組織與條文間之語境。

Source Data

Data Collection and Processing

  • 來源:全國法規資料庫之法規 API;
  • 處理:將 tw-processed-law-article 之條文依法規名稱分組並合併,保留章節標題與條號。

Who are the source data producers?

原始法規由中華民國立法院、行政院及各主管機關制定並公告,並由法務部於全國法規資料庫維護。

Annotations

Annotation process

本資料集不包含額外人工標註。

Who are the annotators?

不適用。

Personal and Sensitive Information

本資料集為公開之法規條文,不包含個人敏感資訊。

Bias, Risks, and Limitations

  • 時效性:法規會持續修正,本資料集反映特定時點之版本快照;
  • 長文本偏態:整部法規合併後文本長度差異極大,自普通條文(幾百字)到複雜法律(數萬字)皆有;
  • 廢止法規亦包含:需依 level 與 abandon_note 進行篩選。

Recommendations

建議使用者:

  • CPT 訓練時依 level 過濾(例如僅使用「法律」與「命令」,排除已廢止);
  • 與條文單位語料(tw-processed-law-article、tw-structured-law-article)搭配使用,同時獲得長上下文與精確條文;
  • 使用時定期與全國法規資料庫比對以更新訓練資料。

Citation

@misc{tw-processed-law-ctx,
  title        = {tw-processed-law-ctx: ROC Full-Law Context Corpus},
  author       = {Liang Hsun Huang},
  year         = {2024},
  howpublished = {\url{https://huggingface.co/datasets/lianghsun/tw-processed-law-ctx}},
  note         = {11,462 ROC laws with all articles merged into a single text per law, for CPT training.}
}

Dataset Card Authors

Liang Hsun Huang

Dataset Card Contact

Liang Hsun Huang