Dataset Viewer
Auto-converted to Parquet Duplicate
content_id
stringclasses
100 values
case_id
stringlengths
15
36
function
stringclasses
35 values
kind
stringclasses
3 values
inputs_json
stringlengths
2
125
expected_json
stringlengths
1
12
tags
listlengths
0
2
con-0101
acceleration_triggered:b001
acceleration_triggered
boundary
{"attachment_event": false, "covenant_breach": false, "demanded": false, "insolvency_event": false}
false
[ "bool_combo" ]
con-0101
acceleration_triggered:b002
acceleration_triggered
boundary
{"attachment_event": false, "covenant_breach": false, "demanded": false, "insolvency_event": true}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b003
acceleration_triggered
boundary
{"attachment_event": true, "covenant_breach": false, "demanded": false, "insolvency_event": false}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b004
acceleration_triggered
boundary
{"attachment_event": true, "covenant_breach": false, "demanded": false, "insolvency_event": true}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b005
acceleration_triggered
boundary
{"attachment_event": false, "covenant_breach": true, "demanded": false, "insolvency_event": false}
false
[ "bool_combo" ]
con-0101
acceleration_triggered:b006
acceleration_triggered
boundary
{"attachment_event": false, "covenant_breach": true, "demanded": false, "insolvency_event": true}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b007
acceleration_triggered
boundary
{"attachment_event": true, "covenant_breach": true, "demanded": false, "insolvency_event": false}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b008
acceleration_triggered
boundary
{"attachment_event": true, "covenant_breach": true, "demanded": false, "insolvency_event": true}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b009
acceleration_triggered
boundary
{"attachment_event": false, "covenant_breach": false, "demanded": true, "insolvency_event": false}
false
[ "bool_combo" ]
con-0101
acceleration_triggered:b010
acceleration_triggered
boundary
{"attachment_event": false, "covenant_breach": false, "demanded": true, "insolvency_event": true}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b011
acceleration_triggered
boundary
{"attachment_event": true, "covenant_breach": false, "demanded": true, "insolvency_event": false}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b012
acceleration_triggered
boundary
{"attachment_event": true, "covenant_breach": false, "demanded": true, "insolvency_event": true}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b013
acceleration_triggered
boundary
{"attachment_event": false, "covenant_breach": true, "demanded": true, "insolvency_event": false}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b014
acceleration_triggered
boundary
{"attachment_event": false, "covenant_breach": true, "demanded": true, "insolvency_event": true}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b015
acceleration_triggered
boundary
{"attachment_event": true, "covenant_breach": true, "demanded": true, "insolvency_event": false}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:b016
acceleration_triggered
boundary
{"attachment_event": true, "covenant_breach": true, "demanded": true, "insolvency_event": true}
true
[ "bool_combo" ]
con-0101
acceleration_triggered:u017
acceleration_triggered
unknown
{"attachment_event": false, "covenant_breach": false, "demanded": false, "insolvency_event": null}
null
[ "none:insolvency_event" ]
con-0101
acceleration_triggered:u018
acceleration_triggered
unknown
{"attachment_event": null, "covenant_breach": false, "demanded": false, "insolvency_event": false}
null
[ "none:attachment_event" ]
con-0101
acceleration_triggered:u019
acceleration_triggered
unknown
{"attachment_event": false, "covenant_breach": null, "demanded": false, "insolvency_event": false}
false
[ "none:covenant_breach" ]
con-0101
acceleration_triggered:u020
acceleration_triggered
unknown
{"attachment_event": false, "covenant_breach": false, "demanded": null, "insolvency_event": false}
false
[ "none:demanded" ]
con-0101
acceleration_triggered:r021
acceleration_triggered
random
{"attachment_event": true, "covenant_breach": true, "demanded": false, "insolvency_event": true}
true
[]
con-0101
acceleration_triggered:r022
acceleration_triggered
random
{"attachment_event": false, "covenant_breach": false, "demanded": false, "insolvency_event": false}
false
[]
con-0101
acceleration_triggered:r023
acceleration_triggered
random
{"attachment_event": false, "covenant_breach": false, "demanded": false, "insolvency_event": false}
false
[]
con-0101
acceleration_triggered:r024
acceleration_triggered
random
{"attachment_event": true, "covenant_breach": false, "demanded": true, "insolvency_event": true}
true
[]
con-0101
acceleration_triggered:r025
acceleration_triggered
random
{"attachment_event": true, "covenant_breach": false, "demanded": true, "insolvency_event": true}
true
[]
con-0101
acceleration_triggered:r026
acceleration_triggered
random
{"attachment_event": true, "covenant_breach": false, "demanded": false, "insolvency_event": false}
true
[]
con-0101
acceleration_triggered:r027
acceleration_triggered
random
{"attachment_event": false, "covenant_breach": true, "demanded": false, "insolvency_event": false}
false
[]
con-0101
acceleration_triggered:r028
acceleration_triggered
random
{"attachment_event": true, "covenant_breach": false, "demanded": false, "insolvency_event": false}
true
[]
con-0101
acceleration_triggered:r029
acceleration_triggered
random
{"attachment_event": false, "covenant_breach": false, "demanded": false, "insolvency_event": true}
true
[]
con-0101
acceleration_triggered:r030
acceleration_triggered
random
{"attachment_event": true, "covenant_breach": false, "demanded": false, "insolvency_event": false}
true
[]
con-0101
acceleration_triggered:r031
acceleration_triggered
random
{"attachment_event": true, "covenant_breach": true, "demanded": true, "insolvency_event": true}
true
[]
con-0101
acceleration_triggered:r032
acceleration_triggered
random
{"attachment_event": true, "covenant_breach": false, "demanded": true, "insolvency_event": true}
true
[]
con-0101
additional_work_fee:b001
additional_work_fee
boundary
{"qty": 50000, "unit_price": 0}
50000
[ "anchor:unit_price" ]
con-0101
additional_work_fee:b002
additional_work_fee
boundary
{"qty": 0, "unit_price": 0}
50000
[ "anchor:unit_price", "others_lo" ]
con-0101
additional_work_fee:b003
additional_work_fee
boundary
{"qty": 50000, "unit_price": 49999}
500000
[ "anchor:unit_price" ]
con-0101
additional_work_fee:b004
additional_work_fee
boundary
{"qty": 0, "unit_price": 49999}
50000
[ "anchor:unit_price", "others_lo" ]
con-0101
additional_work_fee:b005
additional_work_fee
boundary
{"qty": 50000, "unit_price": 50000}
500000
[ "anchor:unit_price" ]
con-0101
additional_work_fee:b006
additional_work_fee
boundary
{"qty": 0, "unit_price": 50000}
50000
[ "anchor:unit_price", "others_lo" ]
con-0101
additional_work_fee:b007
additional_work_fee
boundary
{"qty": 50000, "unit_price": 50001}
500000
[ "anchor:unit_price" ]
con-0101
additional_work_fee:b008
additional_work_fee
boundary
{"qty": 0, "unit_price": 50001}
50000
[ "anchor:unit_price", "others_lo" ]
con-0101
additional_work_fee:b009
additional_work_fee
boundary
{"qty": 50000, "unit_price": 499999}
500000
[ "anchor:unit_price" ]
con-0101
additional_work_fee:b010
additional_work_fee
boundary
{"qty": 0, "unit_price": 499999}
50000
[ "anchor:unit_price", "others_lo" ]
con-0101
additional_work_fee:b011
additional_work_fee
boundary
{"qty": 50000, "unit_price": 500000}
500000
[ "anchor:unit_price" ]
con-0101
additional_work_fee:b012
additional_work_fee
boundary
{"qty": 0, "unit_price": 500000}
50000
[ "anchor:unit_price", "others_lo" ]
con-0101
additional_work_fee:b013
additional_work_fee
boundary
{"qty": 50000, "unit_price": 500001}
500000
[ "anchor:unit_price" ]
con-0101
additional_work_fee:b014
additional_work_fee
boundary
{"qty": 0, "unit_price": 500001}
50000
[ "anchor:unit_price", "others_lo" ]
con-0101
additional_work_fee:b015
additional_work_fee
boundary
{"qty": 50000, "unit_price": 1000000}
500000
[ "anchor:unit_price" ]
con-0101
additional_work_fee:b016
additional_work_fee
boundary
{"qty": 0, "unit_price": 1000000}
50000
[ "anchor:unit_price", "others_lo" ]
con-0101
additional_work_fee:b017
additional_work_fee
boundary
{"qty": 0, "unit_price": 500000}
50000
[ "anchor:qty" ]
con-0101
additional_work_fee:b018
additional_work_fee
boundary
{"qty": 0, "unit_price": 0}
50000
[ "anchor:qty", "others_lo" ]
con-0101
additional_work_fee:b019
additional_work_fee
boundary
{"qty": 100000, "unit_price": 500000}
500000
[ "anchor:qty" ]
con-0101
additional_work_fee:b020
additional_work_fee
boundary
{"qty": 100000, "unit_price": 0}
50000
[ "anchor:qty", "others_lo" ]
con-0101
additional_work_fee:u021
additional_work_fee
unknown
{"qty": 50000, "unit_price": null}
null
[ "none:unit_price" ]
con-0101
additional_work_fee:u022
additional_work_fee
unknown
{"qty": null, "unit_price": 500000}
null
[ "none:qty" ]
con-0101
additional_work_fee:r023
additional_work_fee
random
{"qty": 60719, "unit_price": 138423}
500000
[]
con-0101
additional_work_fee:r024
additional_work_fee
random
{"qty": 9994, "unit_price": 179234}
500000
[]
con-0101
additional_work_fee:r025
additional_work_fee
random
{"qty": 39990, "unit_price": 921701}
500000
[]
con-0101
additional_work_fee:r026
additional_work_fee
random
{"qty": 93660, "unit_price": 471782}
500000
[]
con-0101
additional_work_fee:r027
additional_work_fee
random
{"qty": 11165, "unit_price": 448389}
500000
[]
con-0101
additional_work_fee:r028
additional_work_fee
random
{"qty": 18673, "unit_price": 991351}
500000
[]
con-0101
additional_work_fee:r029
additional_work_fee
random
{"qty": 67347, "unit_price": 230635}
500000
[]
con-0101
additional_work_fee:r030
additional_work_fee
random
{"qty": 23064, "unit_price": 129618}
500000
[]
con-0101
additional_work_fee:r031
additional_work_fee
random
{"qty": 56915, "unit_price": 205671}
500000
[]
con-0101
additional_work_fee:r032
additional_work_fee
random
{"qty": 90497, "unit_price": 167767}
500000
[]
con-0101
additional_work_fee:r033
additional_work_fee
random
{"qty": 73907, "unit_price": 170701}
500000
[]
con-0101
additional_work_fee:r034
additional_work_fee
random
{"qty": 53327, "unit_price": 783442}
500000
[]
con-0101
is_confidential:b001
is_confidential
boundary
{"designated": false, "independently_developed": false, "lawfully_obtained": false, "publicly_known": false}
false
[ "bool_combo" ]
con-0101
is_confidential:b002
is_confidential
boundary
{"designated": true, "independently_developed": false, "lawfully_obtained": false, "publicly_known": false}
true
[ "bool_combo" ]
con-0101
is_confidential:b003
is_confidential
boundary
{"designated": false, "independently_developed": false, "lawfully_obtained": false, "publicly_known": true}
false
[ "bool_combo" ]
con-0101
is_confidential:b004
is_confidential
boundary
{"designated": true, "independently_developed": false, "lawfully_obtained": false, "publicly_known": true}
false
[ "bool_combo" ]
con-0101
is_confidential:b005
is_confidential
boundary
{"designated": false, "independently_developed": true, "lawfully_obtained": false, "publicly_known": false}
false
[ "bool_combo" ]
con-0101
is_confidential:b006
is_confidential
boundary
{"designated": true, "independently_developed": true, "lawfully_obtained": false, "publicly_known": false}
false
[ "bool_combo" ]
con-0101
is_confidential:b007
is_confidential
boundary
{"designated": false, "independently_developed": true, "lawfully_obtained": false, "publicly_known": true}
false
[ "bool_combo" ]
con-0101
is_confidential:b008
is_confidential
boundary
{"designated": true, "independently_developed": true, "lawfully_obtained": false, "publicly_known": true}
false
[ "bool_combo" ]
con-0101
is_confidential:b009
is_confidential
boundary
{"designated": false, "independently_developed": false, "lawfully_obtained": true, "publicly_known": false}
false
[ "bool_combo" ]
con-0101
is_confidential:b010
is_confidential
boundary
{"designated": true, "independently_developed": false, "lawfully_obtained": true, "publicly_known": false}
false
[ "bool_combo" ]
con-0101
is_confidential:b011
is_confidential
boundary
{"designated": false, "independently_developed": false, "lawfully_obtained": true, "publicly_known": true}
false
[ "bool_combo" ]
con-0101
is_confidential:b012
is_confidential
boundary
{"designated": true, "independently_developed": false, "lawfully_obtained": true, "publicly_known": true}
false
[ "bool_combo" ]
con-0101
is_confidential:b013
is_confidential
boundary
{"designated": false, "independently_developed": true, "lawfully_obtained": true, "publicly_known": false}
false
[ "bool_combo" ]
con-0101
is_confidential:b014
is_confidential
boundary
{"designated": true, "independently_developed": true, "lawfully_obtained": true, "publicly_known": false}
false
[ "bool_combo" ]
con-0101
is_confidential:b015
is_confidential
boundary
{"designated": false, "independently_developed": true, "lawfully_obtained": true, "publicly_known": true}
false
[ "bool_combo" ]
con-0101
is_confidential:b016
is_confidential
boundary
{"designated": true, "independently_developed": true, "lawfully_obtained": true, "publicly_known": true}
false
[ "bool_combo" ]
con-0101
is_confidential:u017
is_confidential
unknown
{"designated": null, "independently_developed": false, "lawfully_obtained": false, "publicly_known": false}
null
[ "none:designated" ]
con-0101
is_confidential:u018
is_confidential
unknown
{"designated": false, "independently_developed": false, "lawfully_obtained": false, "publicly_known": null}
false
[ "none:publicly_known" ]
con-0101
is_confidential:u019
is_confidential
unknown
{"designated": false, "independently_developed": null, "lawfully_obtained": false, "publicly_known": false}
false
[ "none:independently_developed" ]
con-0101
is_confidential:u020
is_confidential
unknown
{"designated": false, "independently_developed": false, "lawfully_obtained": null, "publicly_known": false}
false
[ "none:lawfully_obtained" ]
con-0101
is_confidential:r021
is_confidential
random
{"designated": false, "independently_developed": true, "lawfully_obtained": false, "publicly_known": false}
false
[]
con-0101
is_confidential:r022
is_confidential
random
{"designated": false, "independently_developed": false, "lawfully_obtained": true, "publicly_known": true}
false
[]
con-0101
is_confidential:r023
is_confidential
random
{"designated": false, "independently_developed": true, "lawfully_obtained": true, "publicly_known": false}
false
[]
con-0101
is_confidential:r024
is_confidential
random
{"designated": true, "independently_developed": true, "lawfully_obtained": false, "publicly_known": false}
false
[]
con-0101
is_confidential:r025
is_confidential
random
{"designated": true, "independently_developed": true, "lawfully_obtained": true, "publicly_known": true}
false
[]
con-0101
is_confidential:r026
is_confidential
random
{"designated": true, "independently_developed": true, "lawfully_obtained": false, "publicly_known": false}
false
[]
con-0101
is_confidential:r027
is_confidential
random
{"designated": false, "independently_developed": true, "lawfully_obtained": true, "publicly_known": true}
false
[]
con-0101
is_confidential:r028
is_confidential
random
{"designated": true, "independently_developed": false, "lawfully_obtained": false, "publicly_known": false}
true
[]
con-0101
is_confidential:r029
is_confidential
random
{"designated": false, "independently_developed": false, "lawfully_obtained": false, "publicly_known": true}
false
[]
con-0101
is_confidential:r030
is_confidential
random
{"designated": false, "independently_developed": true, "lawfully_obtained": true, "publicly_known": true}
false
[]
con-0101
is_confidential:r031
is_confidential
random
{"designated": false, "independently_developed": false, "lawfully_obtained": true, "publicly_known": false}
false
[]
con-0101
is_confidential:r032
is_confidential
random
{"designated": false, "independently_developed": true, "lawfully_obtained": true, "publicly_known": true}
false
[]
con-0101
revised_unit_price:b001
revised_unit_price
boundary
{"index_new": 1250, "index_old": 1250, "unit_price": 0}
0
[ "anchor:unit_price" ]
con-0101
revised_unit_price:b002
revised_unit_price
boundary
{"index_new": 500, "index_old": 500, "unit_price": 0}
0
[ "anchor:unit_price", "others_lo" ]
End of preview. Expand in Data Studio

日本語契約書の計算・判定条項データセット(合成)

本物そっくりだが完全に架空の日本語ビジネス契約書と、そこに書かれた計算・判定条項の 計算仕様・正解プログラム・テストケースを対で持つ合成データセット。 「契約書から計算が必要な条項を見つけ、実装し、テストする」システムの評価用に作った。

計算仕様が唯一の正であり、契約書の文言・正解プログラム・テストの期待値は同じ仕様から 機械的に生成している。文言と式を別々に書いていないので三者はずれず、出力前に機械検査で 一致を確かめてある。

生成物は cc-by-4.0 で配布する(著作権表示:© 2026 Yusuke Shibui (shibuiwilliam))。本文は LICENSE。

English summary

Synthetic Japanese business contracts (entirely fictional, no real templates reproduced) paired with machine-checked ground truth for the calculation and decision clauses they contain: a formal calculation spec, a reference Python implementation, and unit-test cases with expected values.

Built for evaluating systems that must find the clauses in a contract that require computation, implement them, and test them — payment due dates, late-payment interest, tiered pricing, pro-rating, liability caps, renewal notice periods, business-day calendars, and so on.

The calculation spec is the single source of truth: the contract wording, the reference program and the test expectations are all generated from it, so they cannot drift apart. No LLM is involved in generation and the pipeline is deterministic.

  • 100 documents across 10 contract types, 4 difficulty profiles
  • 558 rules, 558 task cards, 16689 test cases
  • Each document ships as structured JSON and a rendered PDF with a text layer, plus page-level bounding boxes and reading order
  • inputs/ is what you give the system under test; answers/ is the ground truth

These are not legally valid contracts. They are synthetic fixtures for system development and evaluation, not for real-world use or legal advice. See the license section below — redistribution terms are still undecided.

Not for training AI models. This dataset must not be used to train, fine-tune, distill, or otherwise develop any AI/ML model (including LLMs and VLMs). The contract clauses, calculation-spec explanations and task cards were written by Claude (Anthropic) inside a Claude Code session; they are Outputs of that service, and Anthropic's Usage Policy prohibits using inputs/outputs to train a model without prior authorization (https://www.anthropic.com/legal/aup). Evaluation is not training — benchmarking systems against this dataset, using it as test fixtures, few-shot examples, or a retrieval corpus at inference time is unrestricted; what is excluded is updating model weights from it. This is a notice, not a license condition.

⚠ AI モデルの学習・蒸留には使えない

本データセットを LLM・VLM・その他 AI モデルの学習・ファインチューニング・蒸留・ 強化学習の素材に使ってはならない。

本データセットの契約書の条文・頭書・別紙・計算仕様の説明は、Claude Code セッション内で Claude(Anthropic)が書いた Output である。Anthropic の Usage Policy は「入力と出力を AI モデルの学習(model scraping・model distillation を含む)に用いること」を事前許可なしに 禁じている(https://www.anthropic.com/legal/aup)。学習に使う必要がある場合は、まず Anthropic の事前許可を得ること。

評価は学習ではない。 契約書の読み取り・計算条項の発見・正解プログラムの生成能力の 評価とベンチマークは、このデータセットが作られた目的そのもので、上の制限は一切かからない。 テストフィクスチャとしての利用、few-shot の実例、推論時の検索コーパスとしての利用も同じく 対象外である。除かれるのはモデルの重みを更新する用途だけ。

なお、この節は告知であってライセンス条件ではない。 選んだライセンスが CC BY 系であれば、 下流の受領者に追加の制限を課すことを禁じている(第 2 条(a)(5)(B))ため、上の禁止をその付与条件として 書くことはできず、書いてもいない。制限の出どころは Anthropic の Usage Policy であり、 同ポリシーの適用を受ける者を縛る。

規模(実測)

  • 文書数 100(難易度プロファイル: basic 22 件、challenge 20 件、hard 29 件、standard 29 件)
  • 契約書の種類 10 種(consulting 11、contracting 11、delegation 11、employment 11、lease 10、license 10、nda 10、outsourcing 11、purchase 10、sysdev 5)
  • ルール数 558(出どころ: added 430、bound 128)
  • テストケース数 16689、タスクカード 558
  • PDF のページ数 4〜14(全文書 A4 縦)
  • 生成器 contracts-calculation 0.8.3

使い方

from datasets import load_dataset

docs  = load_dataset("cvusk/japanese-contract-document-understanding-calculation", "documents")["train"]   # 1 行 1 文書
rules = load_dataset("cvusk/japanese-contract-document-understanding-calculation", "rules")["train"]       # 1 行 1 ルール
tasks = load_dataset("cvusk/japanese-contract-document-understanding-calculation", "tasks")["train"]       # 1 行 1 出題
cases = load_dataset("cvusk/japanese-contract-document-understanding-calculation", "cases")["train"]       # 1 行 1 テストケース(正解)

入れ子になる値(inputs・expected・タスクカード全文)は、行ごとに型が揺れて Arrow の変換が 落ちないよう JSON 文字列の列(*_json)で持たせている。json.loads で復元する。

契約書そのもの(JSON・PDF)は inputs/ に、正解は answers/ にファイルとして置いてある。

casesのサンプル1件
{
  "content_id": "con-0101",
  "case_id": "acceleration_triggered:b001",
  "function": "acceleration_triggered",
  "kind": "boundary",
  "inputs_json": "{\"attachment_event\": false, \"covenant_breach\": false, \"demanded\": false, \"insolvency_event\": false}",
  "expected_json": "false",
  "tags": [
    "bool_combo"
  ]
}

構成

data/        load_dataset() 用の平索引(上記 configs)
inputs/<content_id>/
  contract.json            契約書(構造・意味つき。PDF の元)
  <content_id>--<style>.pdf  紙面
  layout.json              bbox・読み順・ページ数(紙面の読み取り正解)
  calendar.json            その文書が使う祝日の固定版
  tasks.jsonl              関数名と入出力の契約(出題)
answers/<content_id>/
  spec.json                計算仕様(唯一の正)
  answer_key.json          ルールと根拠単位の対応・表現手段・難易度
  patch.json               既定の契約書に対して行った追加操作
  manifest.json            生成の記録・検証ゲートの結果・ハッシュ
  cases.jsonl              テストケース(入力と期待値)
  programs/                正解プログラム(Python)
  tests/                   同梱 pytest(--impl で提出実装に差し替えられる)

正解を同梱していることの注意

answers/ と cases config には正解が入っている。評価に使うときは、評価対象の学習データに このデータセットが入っていないことを確かめる。学習に使うなら、inputs/ と tasks だけを使い、 answers/ を伏せた運用にする。

どう作ったか

  1. 既定の契約書(人が執筆した架空の契約書 JSON)を選ぶ。
  2. 計算・判定のパターン(31 種)から、その契約書に無い事項を選ぶ。
  3. 計算仕様を組み、そこから条文の文言・頭書の行・別紙の表・図を生成して契約書に足す。
  4. 同じ仕様から正解プログラムとテストケースを生成する。
  5. 契約書を PDF に描画する(JSON → HTML → WeasyPrint)。
  6. 検証ゲートを掛け、全部通った文書だけを出す。

生成の経路で LLM は使っていない。同じ seed なら同じ出力になる(決定的)。

品質保証

全文書が次の検証ゲートを通っている。

検査
G1–G2 仕様のスキーマ・型・単位。仕様の引用が契約書の単位に逐語で存在する
G3–G4 明示すべき事項に対応する文がある。本文・頭書・別紙から読み直した値が仕様と一致する
G5–G6 契約書に書いた計算例が参照インタプリタと一致する。参照インタプリタと正解プログラムが全ケースで一致する
G7–G8 生成したテストが変異をすべて検出する。日付を扱うルールに暦の境界ケースが入っている
G9–G10 既存の条項・定数・定義語・別紙番号と衝突しない。スキーマ検証・索引再計算・描画が成功する
G11–G12 根拠単位が言い回しと構造で発見できる。同じ seed で再生成してハッシュが一致する

正解プログラムを提出とみなした採点(オラクル検査)は満点である(? 関数・? ケース)。

制限と既知の偏り

  • 法的に有効な契約書ではない。 実務にも法的助言にも使えない。
  • 日本語・横書き・A4 縦のみ。印影・手書き・スキャン劣化は含まない。
  • 税率・法定利率・祝日は法令の実装ではなく、契約書に書かれた値か外部からの入力として扱う。
  • 祝日は固定版(実行時に外部へ取りに行かない)。
  • 既定の契約書の本数が限られるので、同じ base から作った文書が複数ある。 学習と評価で分けるときは base_content_id で分ける(content_id で分けると漏れる)。
  • より詳しい偏りと母数は、同梱の詳細データカードを見る。

架空性

会社名・屋号・人物名・住所・連絡先・URL・契約書番号・物件名・金額・日付はすべて架空である。 参考にした実在の契約書ひな型の文章は、部分的にも語順を変えただけのものも一切含まない。 実在名称との偶発的な衝突は、生成前に合成名称へ置換し、全量で回帰検査している。 これらの固有名詞は可能な限り実在しないものを選ぶよう努めているが、万が一実在する名称等と偶然一致していることが判明した場合は、該当箇所を修正する。

ライセンス

データセット全体は cc-by-4.0 で提供する。Copyright (c) 2026 Yusuke Shibui (shibuiwilliam)

正解プログラムと同梱テスト(answers/*/programs/・answers/*/tests/)は生成された Python コードであり、同じ条件で利用できる。

PDF にはフォントが埋め込まれている(PDF のフォント記述子から実測)。再配布は次の条件に従う。

  • SIL Open Font License 1.1:Noto-Sans-JP、Noto-Sans-JP-Bold、Noto-Serif-JP、Noto-Serif-JP-Bold

contract.json・layout.json・data/・answers/ はフォントのデータを含まない。

詳しい素性

規模・内訳・正解の中身・テストケースの作り方・品質保証の実測値は data-card.md に全部入っている (実測だけから生成したデータカード)。

Citation

@misc{keiyaku_calc,
  title  = {Japanese Contract Document Understanding — Calculation (synthetic, with ground-truth programs and test cases)},
  author = {Yusuke Shibui (shibuiwilliam)},
  year   = {2026},
  howpublished = {Hugging Face Hub},
  url    = {https://huggingface.co/datasets/cvusk/japanese-contract-document-understanding-calculation},
  note   = {Licensed under cc-by-4.0.}
}
Downloads last month
479