claimset 0.45.0__tar.gz → 0.45.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {claimset-0.45.0 → claimset-0.45.2}/PKG-INFO +2 -2
- {claimset-0.45.0 → claimset-0.45.2}/README.md +1 -1
- {claimset-0.45.0 → claimset-0.45.2}/pyproject.toml +1 -1
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/__init__.py +1 -1
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/skills/claimset-lab/SKILL.md +1 -1
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/skills/claimset-submit/SKILL.md +10 -9
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/spec/claimset-v0.45.md +26 -6
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/export.py +12 -5
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/nextstep.py +15 -6
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/summary.py +7 -2
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/migrate.py +3 -1
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/render.py +21 -5
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/validate.py +113 -5
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset.egg-info/PKG-INFO +2 -2
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset.egg-info/SOURCES.txt +1 -0
- claimset-0.45.2/tests/test_interpreted.py +135 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_draft.py +1 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_next.py +1 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_void.py +14 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_table_estimands.py +3 -1
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_table_keys.py +53 -0
- {claimset-0.45.0 → claimset-0.45.2}/LICENSE +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/setup.cfg +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/__main__.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/agents.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/bundle.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/claim.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/cli.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/agents/AGENTS.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/agents/GUIDE.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/agents/RULES.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/agents/opencode-guard.js +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/examples/published-native.json +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/examples/submission-from-lab.json +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/examples/submission-native.json +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/skills/claimset-from-paper/SKILL.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/skills/claimset-lab/claimset +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/skills/claimset-review/SKILL.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/skills/claimset-revise/SKILL.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/spec/claimset-revision-v0.6.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/spec/extensions/README.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/spec/extensions/linguistics-v0.1.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/spec/extensions/qualitative-v0.1.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/spec/extensions/review-v0.1.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/spec/lab-record-v0.23.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/study-planning/LICENSE +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/study-planning/README.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/study-planning/SOURCE.json +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/study-planning/experiments.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/study-planning/prediction.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/data/study-planning/qualitative.md +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/extensions/__init__.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/extensions/linguistics_v0_1.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/extensions/qualitative_count.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/extensions/qualitative_v0_1.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/extensions/review_v0_1.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/__init__.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/anchor.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/cli.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/core.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/decision.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/draft.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/guard.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/layout.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/protect.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/qualitative.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/record.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/results.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/review.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/run.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/sources.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/tables.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lab/view.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/lean.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/package.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/renumber.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/revision.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/score.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/subfields.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/submit.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/versions/__init__.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/versions/v0_39.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/versions/v0_40.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/versions/v0_41.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/versions/v0_42.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/versions/v0_43.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/versions/v0_44.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset/views.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset.egg-info/dependency_links.txt +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset.egg-info/entry_points.txt +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/src/claimset.egg-info/top_level.txt +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_additions.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_agent_label.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_agents.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_based_on.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_bugs.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_bundle.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_claim.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_code_as_text.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_compat.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_competing_interest.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_contributor_order.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_control_characters.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_correct_table_files.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_ext_review.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_extensions.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_formula_delimiters.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_guide.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_highlights.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_kinds.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_actors.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_agents.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_choices.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_code_flag.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_coding.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_compress.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_counts.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_decision.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_export.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_extensions.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_protect.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_revisions.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_rules_per_hypothesis.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_skill.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_sources.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_tables.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_v022.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lab_v023.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_lean.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_limits.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_long_formula.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_math_outside_formulae.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_migrate_report.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_number_format.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_observation.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_packaging.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_planned_estimates.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_principal_gaps.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_process_checks.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_published_as.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_published_corrections.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_quantity_binding.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_reading_aids.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_reading_order.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_references_present.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_registered.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_render_api.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_renumber.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_revision.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_score.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_second_round.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_sections.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_studies.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_study_branches.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_study_planning.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_subfield.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_submit.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_summary.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_summary_and_names.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_sync.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_synthesis.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_table_files.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_text_forms.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_uncertainty.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_validate.py +0 -0
- {claimset-0.45.0 → claimset-0.45.2}/tests/test_views.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claimset
|
|
3
|
-
Version: 0.45.
|
|
3
|
+
Version: 0.45.2
|
|
4
4
|
Summary: Claimset, an open format for research papers written by AI agents for AI readers and published on EntryLib (entrylib.org): validation, lab records, agent skills and submission.
|
|
5
5
|
Author: Claimset contributors
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -37,7 +37,7 @@ Dynamic: license-file
|
|
|
37
37
|
[](https://github.com/entrylib/claimset/blob/main/LICENSE)
|
|
38
38
|
[](https://pypi.org/project/claimset/)
|
|
39
39
|
|
|
40
|
-
Claimset is an open format for research papers written by AI agents for AI readers, and the tools that go with it. A claimset is a JSON file of atomic, self-contained claims, each with its scope, assumptions, limitations, kind and strength of support, and links to the evidence, results and artefacts behind it. Agents write the papers; a human guarantor answers for them. Claimsets are published on **[EntryLib](https://entrylib.org)**, where people read them
|
|
40
|
+
Claimset is an open format for research papers written by AI agents for AI readers, and the tools that go with it. A claimset is a JSON file of atomic, self-contained claims, each with its scope, assumptions, limitations, kind and strength of support, and links to the evidence, results and artefacts behind it. Agents write the papers; a human guarantor answers for them. Claimsets are published on **[EntryLib](https://entrylib.org)**, where people read them as pages or through their own AI assistant, and agents read them through its MCP server.
|
|
41
41
|
|
|
42
42
|
Research is iterative, so the format has a companion: the **lab record**, an append-only, hash-chained log of questions, hypotheses, plans, runs and results kept while the research happens. The claimset is drawn from it, negative results included.
|
|
43
43
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://github.com/entrylib/claimset/blob/main/LICENSE)
|
|
7
7
|
[](https://pypi.org/project/claimset/)
|
|
8
8
|
|
|
9
|
-
Claimset is an open format for research papers written by AI agents for AI readers, and the tools that go with it. A claimset is a JSON file of atomic, self-contained claims, each with its scope, assumptions, limitations, kind and strength of support, and links to the evidence, results and artefacts behind it. Agents write the papers; a human guarantor answers for them. Claimsets are published on **[EntryLib](https://entrylib.org)**, where people read them
|
|
9
|
+
Claimset is an open format for research papers written by AI agents for AI readers, and the tools that go with it. A claimset is a JSON file of atomic, self-contained claims, each with its scope, assumptions, limitations, kind and strength of support, and links to the evidence, results and artefacts behind it. Agents write the papers; a human guarantor answers for them. Claimsets are published on **[EntryLib](https://entrylib.org)**, where people read them as pages or through their own AI assistant, and agents read them through its MCP server.
|
|
10
10
|
|
|
11
11
|
Research is iterative, so the format has a companion: the **lab record**, an append-only, hash-chained log of questions, hypotheses, plans, runs and results kept while the research happens. The claimset is drawn from it, negative results included.
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "claimset"
|
|
7
|
-
version = "0.45.
|
|
7
|
+
version = "0.45.2"
|
|
8
8
|
description = "Claimset, an open format for research papers written by AI agents for AI readers and published on EntryLib (entrylib.org): validation, lab records, agent skills and submission."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
@@ -31,7 +31,7 @@ Follow these steps in order; the sections below give the detail of each. Wheneve
|
|
|
31
31
|
9. **Run the planned test or estimate once** (`claimset lab run --plan PL1 … -- <command>`).
|
|
32
32
|
10. **Record the verdict** (`claimset lab verdict PL1`, then `claimset lab status H1 <verdict> --plan PL1 --evidence … --why "…"`), whatever it is. An estimation plan has no verdict: `claimset lab verdict PL1` shows the values, and export reports them.
|
|
33
33
|
11. **Record what else you found** as notes, and what you did not plan as exploratory runs; a finding worth claiming is a new hypothesis `--from-exploration` with a new plan on new data, drafted and agreed as in steps 3 to 7.
|
|
34
|
-
12. **Finish:** `claimset lab next` says nothing is left; `claimset lab verify` reports OK; anchor if the record is not on a study branch (`claimset lab anchor`).
|
|
34
|
+
12. **Finish:** `claimset lab next` says nothing is left; then check that every goal of the brief is met: go through the requirements you listed in step 2 and find, for each, what in the record meets it (a planned estimate, a test, a diagnostic its runs report, a note). A requirement nobody planned for (a count the brief asks for, a check of the method) is not met by the planned run alone: record in a note why it is not met, or draft a plan for it with the supervisor. Then `claimset lab verify` reports OK; anchor if the record is not on a study branch (`claimset lab anchor`).
|
|
35
35
|
13. **Export and complete** the claimset with the claimset-submit skill (`claimset lab export`).
|
|
36
36
|
|
|
37
37
|
## Rules you never break
|
|
@@ -31,7 +31,7 @@ The one summary of the specification's statement text rules (spec §8), for ever
|
|
|
31
31
|
- **Terms** (rule 5): mark a defined term where a text names it, `[[D1:forecast skill]]`. A marker's text is plain words, never a formula: `the [[D46:identity matrix]] $I_n$` (W67).
|
|
32
32
|
- **Mathematics** (rule 6): LaTeX between dollar signs, `$…$` within a sentence for symbols and short conditions ($T$, $\epsilon_t \sim N(0, \sigma^2)$), `$$…$$` for an equation on a line of its own, as a paper would display it: a model's or method's defining equations, and long expressions. Several equations shown together go in one `$$\begin{aligned} y_t &= … \\ v_t &= … \end{aligned}$$`. Write a formula as a typeset paper would set it: the quantity's name inside the formula that defines it (`$\mathrm{Asymmetry} = 1 - \frac{4\phi}{\pi}$`, not `Asymmetry $= 1 - \phi/(\pi/4)$`), and fractions with `\frac{a}{b}`, not `a/b`, wherever a ratio of expressions, a displayed formula or a definition holds one; keep a slash only where `\frac` would be cramped (an exponent, a subscript such as $L_{3/2}$, a short inline ratio of two symbols such as $\lambda_3/\lambda_2$). Every formula, in every field, stands between dollar signs: never Unicode (`σ_1²`) or ASCII (`a1>=1`, `lam^2`) mathematics (W63, W64). A proof step may instead be one formula without dollar signs (spec §3.4).
|
|
33
33
|
- **Symbols** (spec §3.2): explain each symbol once, where it first appears in the claimset (in the first definition that writes it, with its unit or range where that matters), and not again; a term the paper writes a symbol for gives it in `symbol`.
|
|
34
|
-
- **Short labels** (spec §3.2, from v0.45): the reading view keys each table and each evidence object's results, naming every term they use by its `symbol`, else its `short`, else the term (`key: D7 method; D14 RMSSE; D17 CES`)
|
|
34
|
+
- **Short labels** (spec §3.2, from v0.45): the reading view keys each table and each evidence object's results, naming every term they use by its `symbol`, else its `short`, else the term (`key: D7 method; D14 RMSSE; D17 CES`), a term longer than 30 characters shortened by fixed rules (its own abbreviation, one the paper uses, standard abbreviations of common words; §3.2 *Shortening a term*). A term those rules cannot shorten, used in a table, a result's variable or a condition, gets a `short` label (W69), and any term may get one where a label says more than the rules make (`auto CES` for "CES with automatic seasonal selection"): plain text of at most 30 characters that a reader of the paper recognises, an abbreviation it uses (`MSIS`) or the term cut to what tells it apart (`"CES and ETS (non-seasonal)"` for "CES and the non-seasonal special cases of ETS") (W69). A label, not a symbol: no formula.
|
|
35
35
|
- **Numbers** (rule 10): as recorded, with a point for decimals and no thousands separators (`1000`, `0.25`), at the precision the paper reports (W50).
|
|
36
36
|
- **Parts** (rule 11): a statement whose assertion has parts marks them `(a)`, `(b)`, `(c)`, after the words that hold for all of them; pages set them out as a list.
|
|
37
37
|
- **Code** (rule 12): a function, call or command in backticks (`` `auto.arima()` ``, `` `adam(y, h = 12)` ``), several lines in a fenced block, ```` ```r ````; a package named as a thing (the forecast R package) is a name (W65).
|
|
@@ -67,7 +67,7 @@ If the work was done with a lab record (`claimset/<study>/lab/lab.jsonl`, or an
|
|
|
67
67
|
- Run `claimset lab export [--paper NAME]` if the tool is available (with several papers recorded, one paper at a time). It writes a draft that holds everything the record states and prints a **completion list**: the decisions and wording still needed (licence, guarantor, principal claims, claim types, scopes, evidence profiles and descriptions, statements of negative results). Work through that list; do not change what the record states, such as `hypothesis`, `planning`, `planned_at`, `lab_runs` or the exploration counts. If export refuses (an open hypothesis, an unmerged agent log, a record that does not verify), fix the record with `claimset lab` commands, never by editing it.
|
|
68
68
|
- Without the tool, build the claims from the record by hand, following the mapping in lab record §9.
|
|
69
69
|
- Every hypothesis that reached `supported`, `not_supported` or `inconclusive` becomes a claim with `hypothesis: {lab_event, outcome}`, `planning`, and for planned tests `planned_at`, `planned_at_anchor` and `test` (the decision rule) copied from the record. Never upgrade `exploratory` to `confirmatory`, and never change a `test`'s rules: they are what the plan fixed before the data were seen. Its `quantities` say where the values are: each binds exactly one result entry or table cell of the claim's evidence (a cell by its column's variable and its table's, row's and column's conditions, e.g. `{"variable": "D13", "conditions": {"method": "D8"}}` for the MCE of the method in row r1), with a `statistic` where columns of one variable differ only by it (`"statistic": "median"`). Whenever you change how the evidence records its numbers (results made into a table, columns renamed to terms), rebind the quantities in the same edit. The validator binds them and evaluates the rules: a conclusive outcome that rests on a quantity binding nothing or several observations is rule 91, an outcome the rules do not give is rule 92.
|
|
70
|
-
- Every decided estimation plan becomes a claim with `planning: planned_estimate` and `estimate` (the estimands the plan fixed, `lab_plan`, `runs`, `flags`, and `not_obtained` for values the runs did not give), with no `hypothesis` and no `test`: a value planned and reported, neither supported nor refuted (spec §3.3.3, *Planned estimates*). Its statement is drafted from the values; rewrite it as a sentence a reader understands alone, giving each value with its uncertainty and the scope the plan fixed, and saying which were not obtained. Call a value large or small only by a standard the paper states and cites. Write every number as it is recorded, with no thousands separators (`1000`, not `1,000`; §8 rule 10). Each estimand binds one result entry or table cell, as a test's quantities do (rule 96): rebind them when you restructure the evidence. A table estimand (`"table": true`, from v0.44) binds every value of its variable under its conditions, a grid the plan fixed (one value per setting or size):
|
|
70
|
+
- Every decided estimation plan becomes a claim with `planning: planned_estimate` and `estimate` (the estimands the plan fixed, `lab_plan`, `runs`, `flags`, and `not_obtained` for values the runs did not give), with no `hypothesis` and no `test`: a value planned and reported, neither supported nor refuted (spec §3.3.3, *Planned estimates*). Its statement is drafted from the values; rewrite it as a sentence a reader understands alone, giving each value with its uncertainty and the scope the plan fixed, and saying which were not obtained. Call a value large or small only by a standard the paper states and cites. Write every number as it is recorded, with no thousands separators (`1000`, not `1,000`; §8 rule 10). Each estimand binds one result entry or table cell, as a test's quantities do (rule 96): rebind them when you restructure the evidence. A table estimand (`"table": true`, from v0.44) binds every value of its variable under its conditions, a grid the plan fixed (one value per setting or size): say in the statement what the values show, at the level of a conclusion (which arm, method or setting is higher or lower, how the values change across the grid, where a pattern holds and where it does not), not the values or their range, and name the tables that hold them; write each further pattern a reader needs as an exploratory claim of its own, citing the rows that show it. Every table and data figure of the evidence is interpreted by a claim that cites it (spec §3.4, *Tables and claims*; warning 70); a statement that still begins `Under plan PL…,` is the export's draft (warning 71).
|
|
71
71
|
- **Negative results are claims too**, in this claimset: state plainly what was not found, with scope and evidence (see `examples/submission-from-lab.json`, claim C4).
|
|
72
72
|
- Fill `paper.exploration` with the counts from the record, and list the record as an artefact of kind `lab_record`, with any `withheld_events` and their reasons.
|
|
73
73
|
- Give evidence objects the `lab_runs` they came from. Export records their numbers as **tables** (rows the compared units, columns the variables) and writes every result of the record, at full precision, to a CSV beside the claimset (`files/<paper>.results.csv`, a `data` artefact the evidence and tables name). Check each table: a self-contained description, each column named by a variable term where the study defines one (`m4 mce` → the term for MCE), the conditions that set columns apart. Claims cite the rows they rest on (`E12.T1.r1`). Package the claimset (`claimset package`) so the CSV goes with it.
|
|
@@ -305,7 +305,7 @@ A formal result you cite and apply is `cited` support of your claim, not a claim
|
|
|
305
305
|
- **Models**: provider, name, version required; identifier, weights, accessed recommended.
|
|
306
306
|
- **Artefacts**: give each of the work's own artefacts and each packaged file a `licence` (SPDX identifier); an artefact taken from a cited work (it names its `reference`) carries none, since its licence belongs with that work. Link code and data on a git host at a full commit hash, never a branch (`https://github.com/org/repo/tree/<40-hex commit>/path`): a branch moves (W21). If the work is archived (Software Heritage, Zenodo), give the identifier as `archive_uri`; otherwise the platform archives pinned commits at publication.
|
|
307
307
|
- **Humans** from step 2, with their positions (`supervisor`, `guarantor`, `contributor`) and CRediT roles.
|
|
308
|
-
- **Paper**: title (descriptive, no rhetoric), licence, contributions, highlights (step 12, chosen by the guarantor), `autonomy`, contribution_record, `origin: "native"`. Nothing else at paper level.
|
|
308
|
+
- **Paper**: title (descriptive, no rhetoric; chosen by the guarantor at the hand-over, step 12), licence, contributions, highlights (step 12, chosen by the guarantor), `autonomy`, contribution_record, `origin: "native"`. Nothing else at paper level.
|
|
309
309
|
- **Classification**: give 3–8 precise `keywords` (e.g. `"healthcare demand forecasting"`); the platform assigns the OpenAlex topics from them and from the content. Always propose the `subfield` (spec §3.1): a classifier's choice, which nobody sees before publication, has put papers in fields far from their own. `claimset subfields <words>` lists the OpenAlex subfields whose name holds the words (`claimset subfields` lists all 252); take the ID from that list, never from memory, and give it as `"subfield": "openalex:subfields/2613"`. The guarantor agrees to it by name at the hand-over (step 12). `claimset validate` warns when none is proposed (W55) or when the ID is not a subfield's (W56), and prints the name of a valid one. Leave `topics` to the platform.
|
|
310
310
|
|
|
311
311
|
### 9a. Package the files
|
|
@@ -383,12 +383,13 @@ Write the file where it belongs (spec §2.4): `claimset/<study>/<paper>.claimset
|
|
|
383
383
|
Give the human a short summary:
|
|
384
384
|
1. Validation result (errors: 0; list remaining warnings and why they remain). `claimset validate` ends with the warnings to address before hand-over (a number no result holds, a risk of reversal not weighed, a test quantity bound to nothing, a principal claim without scope or without any limitation): fix each, or say why it stays.
|
|
385
385
|
2. The principal claims, in plain language, with their strength and computed verifiability.
|
|
386
|
-
3. **
|
|
387
|
-
4. **
|
|
388
|
-
5. **
|
|
389
|
-
6. **
|
|
390
|
-
7. **
|
|
391
|
-
8.
|
|
386
|
+
3. **The title, for the guarantor to choose** (spec §3.1): propose three titles, each saying plainly what the paper found or asked and each putting a different thing first (the main finding, the question, the method or setting), with a line on what each puts first, so that the guarantor can choose the best. A lab record's working title was set before the results and is only a placeholder. Ask the guarantor to choose or rewrite one, record it in `paper.title`, and never submit under a title they have not chosen.
|
|
387
|
+
4. **Highlights, for the guarantor to choose** (spec §3.1): what a reader should take from the paper first, shown at the top of the paper's page on the platform and in the reading view. Propose up to five, in order of priority, from the principal claims and the terms the paper introduces (definitions without `source`: a new method, measure, concept or data set), each with its ID, a plain-language line and why you propose it. Ask the guarantor to choose, reorder or reject them, then record their choice in `paper.highlights` (`["C2", "D4"]`) and validate again. A claim they want highlighted that is not principal becomes a contribution (its `role` and `paper.contributions`). If they prefer none, leave the field out and say so (warning 39 then remains, and is fine). Never choose them yourself.
|
|
388
|
+
5. **A summary, for the guarantor to approve** (spec §3.1, optional): the paper in a few sentences of plain language, at most 250 words (the length of an abstract), for a reader outside its field, drafted from the principal claims. Ask the guarantor to approve or rewrite it, and record it in `paper.summary`; it is shown first on the paper's page. Never copy an abstract into it.
|
|
389
|
+
6. **Names and summaries of the claims, for the guarantor to approve** (spec §3.3, optional): list each claim's `name` and `summary` beside its ID, and record what the guarantor changes. They are what readers see first of each claim.
|
|
390
|
+
7. **Sections, for the guarantor to approve** (spec §3.1, optional; for a paper of more than a handful of claims): propose `paper.sections`, the sections the claims are read in, as a paper groups its results under headings: each a short title and its claims in reading order, every claim that is not an assumption in exactly one. Group by what the claims are about (the case they hold in, the question they answer), not by their kind. In a quantitative paper, put the theory first: the model or method and its mathematical results (definitions, derivations, propositions, proofs), then simulation studies, then empirical applications and case studies; within each, the paper's own order. List the titles with their claims, and record what the guarantor changes.
|
|
391
|
+
8. **The subfield, for the guarantor to agree to** (spec §3.1): say the name of the subfield the file proposes, as `claimset validate` prints it ("Subfield proposed: Statistics and Probability"), and one or two other candidates from `claimset subfields <words>` if the choice is not obvious. Ask the guarantor whether it is the paper's field, and record the one they choose. Do not submit before they have agreed to it by name: it is the field the paper is listed under.
|
|
392
|
+
9. Open items needing a human: guarantor confirmation on the platform, anything you could not determine.
|
|
392
393
|
|
|
393
394
|
**Score, if the human wants it.** Before they decide, ask whether a score is worth running; it is optional, and never run it unasked or make it a condition of submitting. `claimset score <paper>.claimset.json` (on this machine; it needs the rubric, `pip install entrylib-rubric`) gives the score EntryLib's rubric would give the claimset once published; add `--novelty` only if the human agrees to send the principal claims' words to EntryLib's search, and `--cited` (which sends the identifiers of the cited claims published on EntryLib, to score them by their scores there) when the claimset cites such claims. Without a terminal, the platform does the same: on EntryLib, the MCP server's `score` tool, or its HTTP API for an agent with neither (https://entrylib.org/llms.txt says how). Report the paper's score and band and the biggest issues, each with what would fix it, plainly: the score checks the record (evidence, plan, verifiability, context, open problems), not the science. Then let the human choose: submit as it is, or amend it (fixing only what is true of the research: never weaken a claim's honesty or drop a limitation to raise a score) and score again.
|
|
394
395
|
|
|
@@ -18,6 +18,10 @@ A model reading a paper's results met them by identifier only. An evidence table
|
|
|
18
18
|
- §2.3, Appendix D: the reading view gives a **key** under each table and under an evidence object's results that name definitions by identifier: one line, the identifiers the table (or the results) uses, in order of first use, each with a brief label (`key: D7 method; D14 RMSSE; D17 CES`). A column's header names its conditions in words (`D11, DGP Normal`, not `D11 {DGP: Normal}`), and a dimensionless value's unit, `1`, is not written. On five published claimsets, keys with each term's name as its label added 0.3 to 3% to the reading view.
|
|
19
19
|
- §3.2: new optional `short` on a definition: a short label for its term, plain text of at most 30 characters, which the key gives when the term has no `symbol` (`"short": "CES and ETS (non-seasonal)"` for "CES and the non-seasonal special cases of ETS"). `symbol` keeps its meaning, the notation the paper writes for the term: a plain-text label is a different thing, and a later version may not change what a field means (§2.6). New rule 109.
|
|
20
20
|
- New warning 69: a definition that a table, a result's variable or a condition names has a term longer than 30 characters and neither a `symbol` nor a `short` label.
|
|
21
|
+
- Amended on 2026-11-29: where a term of more than 30 characters has neither a symbol nor a short label, the key shortens it by fixed rules (§3.2, *Shortening a term*), so that an author need not write one: its own abbreviation, an abbreviation the paper uses, the term without an article or a trailing parenthesis, a capitalised name as its initials, then `&` and standard abbreviations of common words. A term the rules cannot bring to 30 characters keeps its whole term, and only such a term is warned (warning 69). Nothing is ever cut with an ellipsis, and no abbreviation is invented that the paper does not use. The rules are a change of rendering: they apply to files of every version.
|
|
22
|
+
- Amended on 2026-11-30: every table of the evidence, and every figure that shows data, is interpreted by a claim (§3.4, *Tables and claims*). Agents completing claimsets from lab records left a 96-row table with one claim that read "bias was obtained as a table of 96 values, from −0.155 to 0.014": the claimset held the values but said nothing about them. New warning 70: an evidence table, or a figure that shows data, that no claim cites. A warning, not a rule: it applies to files of v0.45 only, and leaves every file valid.
|
|
23
|
+
- Amended on 2026-11-30, §3.3.3: a table estimand's statement says what its values show, at the level of a conclusion, and gives a range only where the conclusion turns on it; a further pattern in the same table is an exploratory claim of its own. New warning 71: a planned estimate whose statement is still the draft `claimset lab export` writes (`Under plan PL3, …`).
|
|
24
|
+
- Amended on 2026-11-30, §3.1: a native paper's title is chosen by its guarantor, as its licence and highlights are: the agent proposes three titles for them to choose from, and a lab record's working title is a placeholder, never the title by default. A study's claimset was submitted under a title its agent had written from the record's working title, which nobody had discussed and its guarantor found unfit. No rule checks it; every file valid before stays valid.
|
|
21
25
|
- The reading view's change is a change of rendering, not of validity: every tool renders files of every version from the baseline (§2.6, *Reading*), so files of v0.44 and earlier get keys and readable headers too, their labels taken from `symbol` or the term. Only files of v0.45 and later can give `short`, and only they are warned.
|
|
22
26
|
- Files of v0.44 and earlier are read as they were written.
|
|
23
27
|
|
|
@@ -636,7 +640,7 @@ A claimset is stored and exchanged as JSON: the canonical file, which tools vali
|
|
|
636
640
|
- **Kept:** the title, summary, licence, source of a converted paper, declarations, contributions, highlights and exploration counts (in words: `exploration 2 questions; hypotheses 10: 3 supported, …; runs 214: 18 confirmatory, 196 exploratory, 11 failed; lab record A10`), followed by the formal verdicts that give no claim: `; not claimed: H1 under PL5 (supported; reworded, into C1), H11 under PL5 (inconclusive; abandoned)`, from v0.44 as amended on 2026-11-17); definitions with their symbol, kind, members, the wholes they are part of, their broader terms, assumptions, identifiers and tables (each with its description and a pipe table, from v0.44 as amended on 2026-11-23); corrections, of a converted source (`converted_from.corrections`) or of the published paper (`published_as.corrections`), each marked under the object it corrects and listed, with what was printed, what is recorded and why, in a section of their own; claims with their name and summary, type, role, novelty (when not `no_prior_found`), support with its pointers and locators, assumptions, `depends_on`, limitations, warrant, strength, verification, verifiability, planning, outcome, scope, relations with their notes and results (relations within the paper as well), assumptions inherited from the terms they rest on (§3.2, *Assumptions of a term*), and test; evidence with its description, design fields, setup, what it is derived from, estimate, observations (results and tables, with their values, units, conditions and where a value was read from) and proof steps; warrants; limitations; open questions; artefact descriptions, figure functions, the observations a figure shows and versions (`[software, version 3.2.0]`; a version that is a content hash, `sha256:…`, is left out; from v0.44 as amended on 2026-11-23); references.
|
|
637
641
|
- **Left out:** `about` (the statement says the same in words; `about` serves search), `provenance`, `field_provenance`, `source_spans`, availability, artefact locations, content hashes and licences, contributors, models, execution records, lab-record identifiers, `schema_version` and the platform's publication fields.
|
|
638
642
|
|
|
639
|
-
- **Tables and results** (from v0.45; applies to files of every version, §2.6 *Reading*): a table's columns are headed by their variable, then their conditions in words, each key and value separated by a space and the conditions by commas, then their statistic and unit in parentheses: `D11, DGP Normal`, `D14 (mean)`, `D9 (GeV)`. A dimensionless value's unit, `1`, is not written, in a header or after a result. Under a table that names definitions by identifier (in its header, its conditions, its row labels or its cells), and under an evidence object's results that do (in their variables and conditions), a **key**: one line, `key:` followed by each such identifier, in order of first use, with a brief label, the definition's `symbol` if it has one, else its `short` (§3.2), else its term: `key: D7 method; D14 RMSSE; D15 MASE; D17 CES`. A term marker (`[[D4:…]]`) carries its own words and is not keyed.
|
|
643
|
+
- **Tables and results** (from v0.45; applies to files of every version, §2.6 *Reading*): a table's columns are headed by their variable, then their conditions in words, each key and value separated by a space and the conditions by commas, then their statistic and unit in parentheses: `D11, DGP Normal`, `D14 (mean)`, `D9 (GeV)`. A dimensionless value's unit, `1`, is not written, in a header or after a result. Under a table that names definitions by identifier (in its header, its conditions, its row labels or its cells), and under an evidence object's results that do (in their variables and conditions), a **key**: one line, `key:` followed by each such identifier, in order of first use, with a brief label, the definition's `symbol` if it has one, else its `short` (§3.2), else its term, shortened by the rules of §3.2 (*Shortening a term*, from v0.45 as amended on 2026-11-29) when it is longer than 30 characters: `key: D7 method; D14 RMSSE; D15 MASE; D17 CES`. A term marker (`[[D4:…]]`) carries its own words and is not keyed.
|
|
640
644
|
- **Order:** the parts come in this order: the header (title, summary, the line of licence, source, contributions and highlights, sections, declarations, collaborations, extensions, exploration), DEFINITIONS (the terms and their mathematics), ASSUMPTIONS, CLAIMS, CLAIMS WITHOUT EVIDENCE, EVIDENCE, WARRANTS, LIMITATIONS, OPEN QUESTIONS, ARTEFACTS, CORRECTIONS, REFERENCES. A part with nothing in it is left out.
|
|
641
645
|
- **Assumptions** (from v0.44 as amended on 2026-11-23): the claims whose support is `assumption` (§3.8) are listed under ASSUMPTIONS, after the definitions and before the claims, one line each: the ID, the name in quotation marks, the category and the check in brackets, and the statement (`C12 "The multiplicative error is i.i.d. with mean one" [statistical; unchecked] The multiplicative error term …`). They are the premises of the claims, each of which names those it rests on (`assumes C12, C13`); they appear in no other part.
|
|
642
646
|
- **Claims without sections:** claims (the assumptions apart) are grouped by role: principal claims, then supporting claims, then secondary claims, each group in file order. Claims that are not principal and whose support is only `argument` or `unstated` follow, under CLAIMS WITHOUT EVIDENCE, so a reader sees at once what the paper asserts or argues without evidence. Principal claims stay with the principal claims whatever their support.
|
|
@@ -748,7 +752,7 @@ The core of this specification is what every field shares and what claims are co
|
|
|
748
752
|
| Field | Type | Notes |
|
|
749
753
|
|---|---|---|
|
|
750
754
|
| `id` | string | Platform-assigned. Persistent identifier of this claimset: a DOI minted by the platform, or the platform's provisional identifier (§7). For converted papers, distinct from the source's identifier |
|
|
751
|
-
| `title` | string | Required |
|
|
755
|
+
| `title` | string | Required. Native papers: chosen by the guarantor (below) |
|
|
752
756
|
| `version` | integer | Platform-assigned. 1, 2, …; each published version is immutable |
|
|
753
757
|
| `previous_version` | string | Platform-assigned. Global ID of the previous version; absent for version 1 |
|
|
754
758
|
| `changes` | list | Platform-assigned for corrections: JSON Patch (RFC 6902) operations against the previous version, each with the `reason` taken from the correction submission |
|
|
@@ -814,6 +818,10 @@ A claimset under a non-commercial licence may be used only for non-commercial pu
|
|
|
814
818
|
- The reading view lists the sections, each with its claims, after the highlights, and gives the claims section by section, each section under its number and title (§2.3; from v0.44 as amended on 2026-11-23).
|
|
815
819
|
- A paper of a few claims needs none: the field is left out.
|
|
816
820
|
|
|
821
|
+
**`title`.** What the paper is called, wherever it is listed or cited. It says what the paper found or asked, plainly, in a phrase a reader of its field would search for; it names the paper's subject, not its tools or the record it was kept in.
|
|
822
|
+
- Native papers: the guarantor chooses it (principle 10), as they choose the licence and the highlights. The agent proposes three titles, each putting a different thing first (the main finding, the question, the method or setting), with a line on what each puts first, so that the guarantor can choose the best, and records their choice (or the title they write instead). A lab record's working title (lab record §5.1) was set before the results existed: it is a placeholder, and becomes the title only if the guarantor chooses it.
|
|
823
|
+
- Converted papers: the source's title, as printed.
|
|
824
|
+
|
|
817
825
|
**`highlights`.** What a reader should take from the paper first: at most five of its principal claims and of the terms it introduces, in order of priority. The platform shows them at the top of the paper's page, and the reading view lists them after the contributions. A highlight selects; it adds nothing: it is an ID, never new text, and the claim or definition it names says what it is.
|
|
818
826
|
- A claim is highlighted only if it is principal: it is listed in `contributions`. A claim the guarantor wants to highlight that is not principal is a contribution, and its `role` says so.
|
|
819
827
|
- A definition is highlighted only if the paper introduces it (it has no `source`, §3.2): a new measure, method, concept or data set can be what a paper contributes. A borrowed term is not this paper's.
|
|
@@ -931,7 +939,17 @@ Retracted papers are never deleted. All their claims inherit the retraction stat
|
|
|
931
939
|
|
|
932
940
|
**`symbol`** (from v0.44 as amended on 2026-11-17). Where the paper writes a symbol for a term, the definition gives it: one inline formula, written as in statements (§8 rule 6), such as `"$s(y,f)$"` for the term `sMAPE term`. One symbol, one meaning: the paper writes the symbol for this term only and writes the term with this symbol only, in every claim, definition and proof step, and no two definitions give the same symbol (warning 53). A quantity written in two ways in one paper (an upper-case letter in one claim and a lower-case one in another) reads as two quantities. A term the paper writes no symbol for has no `symbol`.
|
|
933
941
|
|
|
934
|
-
**`short`** (from v0.45). The reading view names a term briefly where a reader needs its meaning at once: in the key under a table or an evidence object's results (§2.3), beside the identifier a column, a row or a condition gives. The label is the term's `symbol` if it has one, else its `short`, else the term itself. A term
|
|
942
|
+
**`short`** (from v0.45). The reading view names a term briefly where a reader needs its meaning at once: in the key under a table or an evidence object's results (§2.3), beside the identifier a column, a row or a condition gives. The label is the term's `symbol` if it has one, else its `short`, else the term itself, shortened when it is longer than 30 characters (below). A term that the rules below cannot bring to 30 characters, with no symbol and no short label, makes a long key, and is warned where a table, a result's variable or a condition names it (warning 69): give it a `short` label, plain text of at most 30 characters, that a reader of the paper recognises: an abbreviation the paper uses (`MSIS`), or the term cut to what tells it apart from its neighbours (`"CES and ETS (non-seasonal)"` for "CES and the non-seasonal special cases of ETS", `"DGP 1 series"` for "Simulation experiment 1 synthetic series"). It is a label, not a symbol: no formula, and it does not replace the term anywhere else.
|
|
943
|
+
|
|
944
|
+
**Shortening a term** (from v0.45 as amended on 2026-11-29; applies to files of every version, §2.6 *Reading*). Where a term of more than 30 characters has neither a `symbol` nor a `short` label, the reading view gives in its stead the first of these that has at most 30 characters, each step applied to what the step before left:
|
|
945
|
+
|
|
946
|
+
1. The term's own abbreviation, when the term ends with it in parentheses: "false detection probability (FDP)" gives `FDP`.
|
|
947
|
+
2. An abbreviation the paper uses: the initials of the term's words, leaving out *of, the, a, an, and, or, for, in, on, with, to, by, at, from* and anything in parentheses, in capitals, when that abbreviation appears as a word anywhere in the claimset's text: "mean absolute scaled error" gives `MASE` in a paper that writes MASE. An abbreviation the paper does not use is never made: a reader could not decode it.
|
|
948
|
+
3. The term without a leading *the*, *a* or *an* and without a trailing parenthesis: "nine PIC variants of VETS(M,N,M;LN)" gives `nine PIC variants of VETS`.
|
|
949
|
+
4. Each run of two or more capitalised words as its initials: "HadCRUT4 Greenland Mean Surface Temperature series" gives `HadCRUT4 GMST series`.
|
|
950
|
+
5. *and* written `&`, an inner *the* left out, and these common words abbreviated where they stand as whole words: automatic `auto`, autoregressive `AR`, moving average `MA`, standard deviation `SD`, confidence interval `CI`, parameter(s) `param.`/`params`, estimation, estimate(s) `est.`, probability `prob.`, distribution `distr.`, temperature `temp.`, seasonal `seas.`, non-seasonal `non-seas.`, regression `regr.`, simulation(s) `sim.`/`sims`, observation(s) `obs.`, variance `var.`, covariance `cov.`, average `avg.`, maximum `max.`, minimum `min.`, number `no.`, coefficient(s) `coef.`/`coefs`, information `info.`: "parameter estimation bias and dispersion" gives `param. est. bias & dispersion`.
|
|
951
|
+
|
|
952
|
+
If none has at most 30 characters, the label is the whole term. A term is never cut short with an ellipsis. Two terms that would get the same shortened label both get their whole terms. A `short` label the author writes is always given instead: it can say more in fewer characters (`auto CES` for "CES with automatic seasonal selection", where the rules give `CES with auto seas. selection`).
|
|
935
953
|
|
|
936
954
|
**`tables`** (from v0.44 as amended on 2026-11-23). Where the paper specifies a term by a table, the definition gives that table in `tables`, not as a list of values in its prose. A taxonomy of models whose table gives, for each restriction, the blocks of the measurement, transition and persistence matrices $W$, $F$ and $G$ is such a term; written as sentences, its rows read as a list nobody can follow.
|
|
937
955
|
|
|
@@ -1146,7 +1164,7 @@ A claim that tests a hypothesis carries it as `hypothesis`, with the test's outc
|
|
|
1146
1164
|
```
|
|
1147
1165
|
|
|
1148
1166
|
- `estimands`: the values the plan fixed, `{name: {variable, conditions, statistic, field, run, table}}`. Each binds exactly one observation of the evidence the claim's support names, with a number at its `field`, as a test's quantities do (*Quantities and table cells*; rule 96).
|
|
1149
|
-
- A **table estimand** (`"table": true`, from v0.44) is a set of values fixed in advance: the plan named a variable and the conditions it holds fixed, and every observation with that variable and those conditions is one of its values (one per setting, method or size of a grid). It binds all of them, at least one, each with a number at its `field`. The statement
|
|
1167
|
+
- A **table estimand** (`"table": true`, from v0.44) is a set of values fixed in advance: the plan named a variable and the conditions it holds fixed, and every observation with that variable and those conditions is one of its values (one per setting, method or size of a grid). It binds all of them, at least one, each with a number at its `field`. The statement says what the values show, at the level of a conclusion (which setting, method or group is higher or lower, how the values change across the grid, where a pattern holds and where it does not), and names the tables of the evidence that hold them (§3.4, *Tables and claims*); it gives a range or single values only where the conclusion turns on them, and does not recite the table (from v0.45 as amended on 2026-11-30; before, it gave their range first). A further pattern in the same table that a reader needs is a claim of its own, `descriptive`, resting on the rows that show it, with `planning: exploratory`: the plan fixed the values, not that pattern. Use one when the plan fixed a grid of values to estimate; give an estimand without `table` the conditions that pick one value.
|
|
1150
1168
|
- `not_obtained`: optional list of the names of estimands the planned runs did not give (a run failed, a value could not be computed). Each binds nothing, and the statement says which values were not obtained and why. A planned estimate that was not obtained is reported, as one that was.
|
|
1151
1169
|
- `runs`, `lab_plan`, `registration`, `flags`: as in `test`. A planned estimate names its plan: `lab_plan`, `registration`, or both (rule 95).
|
|
1152
1170
|
- The statement gives the values the estimands bind, with their uncertainty, under the scope the plan fixed. It calls them large, small, good or bad only by a standard the paper states and cites; a standard fixed in the plan for deciding would have made the plan a test, and the claim confirmatory.
|
|
@@ -1329,7 +1347,7 @@ D8 and D10 are the two methods, D9 the series, D4 coverage, D7 the level tercile
|
|
|
1329
1347
|
|
|
1330
1348
|
**Contrasts.** A value that compares two positions on one dimension (a difference in means, a ratio, an odds ratio, a standardised effect size, the p-value of a comparison, a rank difference) is an observation of the pair. Its conditions name one position as usual and the other under the reserved key `comparator`; its variable says what the contrast is (a defined variable such as "difference in mean MASE", or text). `{"variable": "D11", "conditions": {"D26": "D1", "comparator": "D2", "D5": "D14"}, "value": -0.013, "interval": {"level": 0.95, "lower": -0.021, "upper": -0.005, "kind": "confidence"}}` is CES against ETS on the M3 monthly series. The comparator lies on the dimension whose value it replaces: a member of the same group, or a value of the same variable. A table of contrasts has `comparator` in its conditions, its row labels or its columns' conditions. The atom of a claim resting on a contrast has the same comparator (§3.3.5).
|
|
1331
1349
|
|
|
1332
|
-
**Tables and claims.** The table is the record of its values; a claim is the record of what the paper concludes from them. A claim resting on a table states the pattern the paper draws (which method, treatment or group is higher or lower, on which variables, under which conditions, including where the paper's own is worse) and cites the table or the rows that hold the values (`E2.T1`, `E2.T1.r3`); it repeats a value only when the conclusion turns on that value ("selected for 6 of the 11 groups", "coverage 0.947, the closest to 95%"). A claim that only retells a table's values, with no conclusion of the paper's own, is not written: the claim that uses the table cites it directly. A comparison stated this way is still one claim (§8 rule 2). A pattern that no claim, warrant or open question uses and that states no loss, limit or null result of the paper's method is not written either (§3.3, *Secondary claims in converted papers*).
|
|
1350
|
+
**Tables and claims.** The table is the record of its values; a claim is the record of what the paper concludes from them. A claim resting on a table states the pattern the paper draws (which method, treatment or group is higher or lower, on which variables, under which conditions, including where the paper's own is worse) and cites the table or the rows that hold the values (`E2.T1`, `E2.T1.r3`); it repeats a value only when the conclusion turns on that value ("selected for 6 of the 11 groups", "coverage 0.947, the closest to 95%"). A claim that only retells a table's values, with no conclusion of the paper's own, is not written: the claim that uses the table cites it directly. A comparison stated this way is still one claim (§8 rule 2). A pattern that no claim, warrant or open question uses and that states no loss, limit or null result of the paper's method is not written either (§3.3, *Secondary claims in converted papers*). Every table of the evidence, and every figure that shows data (`data_plot`, `specimen`), is interpreted by at least one claim that cites it: the table, one of its rows, the figure, or an observation the figure shows (from v0.45 as amended on 2026-11-30, warning 70). The claim says what the table or figure shows, at the level of the paper's conclusions: which is higher or lower, how a quantity changes, where a pattern holds and where it does not; it does not recite the values, which the table holds. A table that no claim reads either has a conclusion a claim should state, or is not evidence of this paper: a file of values a reader may check is an artefact (§3.6), not an evidence table.
|
|
1333
1351
|
|
|
1334
1352
|
**Tables held in a file** (from v0.44 as amended on 2026-11-20). A table of many rows (as a rule more than 20) may keep its rows in a CSV file of the package instead of in `rows`, so that the claimset and its reading view stay short: it gives `rows_file`, the ID of an artefact of kind `data` whose `uri` is that file (a relative path ending in `.csv`; once published, the location the platform stored it at), and `n_rows`, the number of rows. The file holds the table exactly: a header line, then one line per row, row `r1` first; each line gives the row's labels, in the order of `row_labels`, then its values, in the order of `columns`; an empty field is `null`, `true` and `false` are booleans, a number is a number and anything else is text. The header names the fields, and the artefact's `columns` say what each holds (§3.6). Rows are cited as in any table (`E23.T2.r12`, with `r12` the file's twelfth row), and every cell is an observation with the table's, its row's and its column's conditions. Where the package is at hand (a submission, a published claimset, a claimset beside its `files/` folder), the cells are read from the file and checked, bound and compared with the statements as inline cells are; without it, only the table's columns are known. A test's quantity, and an estimand that is not a table estimand, binds an inline cell or a result entry, never a cell of a table held in a file: a value a verdict turns on stays in the claimset. A table estimand may bind a table held in a file. A table a claim needs its reader to see at a glance (a handful of rows) stays inline.
|
|
1335
1353
|
|
|
@@ -2019,7 +2037,9 @@ The file records identifier type and venue facts for cited works only. Trust in
|
|
|
2019
2037
|
66. A citation marker (`[[B12:…]]`, §8 rule 14) names no reference of the file. Checked in the texts of warning 65. (From v0.44 as amended on 2026-11-23.)
|
|
2020
2038
|
67. A term or citation marker holds a formula, `[[D46:$I_n$]]` (§8 rule 5): its text is plain words; write the formula after the marker, `the [[D46:identity matrix]] $I_n$`. Checked in the texts of warning 65. (From v0.44 as amended on 2026-11-23.)
|
|
2021
2039
|
68. A text holds a control character other than a line break (§8 rule 6): a tab, form feed, backspace, carriage return or another character below U+0020, or one of U+007F to U+009F. Before letters it is usually a LaTeX command a JSON writer left with one backslash (`\frac` read as a form feed and "rac"): write the backslash twice in JSON. (From v0.44 as amended on 2026-11-27.)
|
|
2022
|
-
69. Definitions that a table (its columns, conditions, row labels or cells), a result's variable or a condition names have terms longer than 30 characters
|
|
2040
|
+
69. Definitions that a table (its columns, conditions, row labels or cells), a result's variable or a condition names have terms longer than 30 characters, neither a `symbol` nor a `short` label, and a term the rules of §3.2 (*Shortening a term*) cannot bring to 30 characters (§3.2, from v0.45 as amended on 2026-11-29), listed in one warning: give each a `short` label, at most 30 characters, so that the key under a table names it briefly.
|
|
2041
|
+
70. An evidence table, or a figure whose `function` is `data_plot` or `specimen`, that no claim cites: no claim's support names the table (`E2.T1`), one of its rows (`E2.T1.r3`) or its evidence object without naming results; for a figure, no claim's support names the figure or an observation it `shows` (§3.4, *Tables and claims*; from v0.45 as amended on 2026-11-30). Write the claim that says what the table or figure shows (its pattern, not its values), or move a file of values out of the evidence into an artefact.
|
|
2042
|
+
71. A claim with `planning: planned_estimate` whose statement is still the draft that `claimset lab export` writes: it begins `Under plan PL…,` and names the estimands' variables as the plan wrote them (§3.3.3; from v0.45 as amended on 2026-11-30). Rewrite it as a sentence a reader understands alone, saying what the values show.
|
|
2023
2043
|
|
|
2024
2044
|
## 11. Platform dependencies
|
|
2025
2045
|
|
|
@@ -931,9 +931,9 @@ class _Exporter:
|
|
|
931
931
|
if n in tables and tables[n]:
|
|
932
932
|
vals = [v for v in (_claimset.read_field(r["body"], q.get("field") or "value") for r in tables[n])
|
|
933
933
|
if _claimset.rule_number(v)]
|
|
934
|
-
|
|
934
|
+
# no range: a draft that gives one is kept as it is (claimset v0.45 §3.3.3, as amended 2026-11-30)
|
|
935
935
|
parts.append(f"{q.get('variable')}{field}{where} was obtained as a table of {len(tables[n])} "
|
|
936
|
-
f"values
|
|
936
|
+
f"values")
|
|
937
937
|
continue
|
|
938
938
|
parts.append(f"{q.get('variable')}{field}{where} " + (f"was {value:g}" if value is not None
|
|
939
939
|
else "was not obtained"))
|
|
@@ -970,9 +970,13 @@ class _Exporter:
|
|
|
970
970
|
f"cites" + (f"; say that {', '.join(missing)} was not obtained, and why" if missing else "")
|
|
971
971
|
+ (f"; {', '.join(n for n in tables if tables[n])} "
|
|
972
972
|
f"{'is a table estimand' if len([n for n in tables if tables[n]]) == 1 else 'are table estimands'}"
|
|
973
|
-
f" (every result of the variable under the plan's conditions):
|
|
974
|
-
f"
|
|
975
|
-
f"
|
|
973
|
+
f" (every result of the variable under the plan's conditions): say what its values show, at "
|
|
974
|
+
f"the level of a conclusion (which arm, method or setting is higher or lower, how the values "
|
|
975
|
+
f"change across the grid, where a pattern holds and where it does not), not the values "
|
|
976
|
+
f"themselves or their range, and name the tables of the evidence that hold them; write each "
|
|
977
|
+
f"further pattern a reader needs as an exploratory claim of its own, citing the rows that "
|
|
978
|
+
f"show it (claimset spec §3.3.3, §3.4 Tables and claims); if the plan meant one value, its "
|
|
979
|
+
f"estimand was ambiguous: say so"
|
|
976
980
|
if any(tables.values()) else ""))
|
|
977
981
|
self.todo(f"claims.{cid}", f"confirm the type (exported as descriptive) and role of {cid}, and give its "
|
|
978
982
|
f"scope; its novelty is exported as no_prior_found: look for the closest "
|
|
@@ -1358,6 +1362,9 @@ class _Exporter:
|
|
|
1358
1362
|
else:
|
|
1359
1363
|
self.todo("paper.title", "give the title (the record's working title is withheld)")
|
|
1360
1364
|
self.completion[:0] = [
|
|
1365
|
+
{"where": "paper.title", "what": "propose three titles that say what the study found or asked, each "
|
|
1366
|
+
"putting a different thing first, and ask the guarantor to choose (spec §3.1): the title written here is "
|
|
1367
|
+
"the record's working title, a placeholder set before the results"},
|
|
1361
1368
|
{"where": "paper.licence", "what": "ask the supervisor or guarantor which licence applies "
|
|
1362
1369
|
"(SPDX identifier)"},
|
|
1363
1370
|
{"where": "contributors", "what": "ask who the guarantor is: one person, with an ORCID iD, who submits "
|
|
@@ -43,7 +43,9 @@ def steps(events, actor=None, anchored=True, drafts=None):
|
|
|
43
43
|
held = ", ".join(f"{n} {t}{'s' if n > 1 else ''}" for t, n in kinds.items())
|
|
44
44
|
out.append((f"show the draft {name} ({held}) to {human}, one topic at a time, and revise it with them (--draft "
|
|
45
45
|
f"{name} --supersedes ID) until they agree; then record it with their words. Do not run its "
|
|
46
|
-
f"plans before"
|
|
46
|
+
f"plans before. Write and commit the analysis code its plans will run before you record it: each "
|
|
47
|
+
f"plan records the code commit, and a deciding run made with other code is flagged "
|
|
48
|
+
f"code_changed_after_plan",
|
|
47
49
|
f"claimset lab draft show {name}; once they agree: claimset lab draft record {name} {by} "
|
|
48
50
|
f'--on-behalf-of {human} --words "<their reply>" --given-at <when> --channel conversation'))
|
|
49
51
|
asked = {h["question"] for h in s["hypotheses"]} | {p["question"] for p in s["plans"] if p["kind"] == "estimation"}
|
|
@@ -80,13 +82,17 @@ def steps(events, actor=None, anchored=True, drafts=None):
|
|
|
80
82
|
f'claimset lab approve {shown} {by} --on-behalf-of {human} --words "<their reply>" '
|
|
81
83
|
f'--given-at <when> --channel conversation'))
|
|
82
84
|
for p in s["plans"]:
|
|
83
|
-
if p["kind"] != "exploratory" and not p["awaiting_approval"] and not p["done"]
|
|
84
|
-
|
|
85
|
+
if p["kind"] != "exploratory" and not p["awaiting_approval"] and not p["done"] and not p.get("decided") \
|
|
86
|
+
and not p.get("void"):
|
|
87
|
+
out.append((f"run the test {p['id']} plans, exactly as planned, with the code committed "
|
|
88
|
+
f"when the plan was written; if the code has to change, correct the plan (--supersedes "
|
|
89
|
+
f"{p['id']}) and have it approved again before any data it decides on is seen, since a "
|
|
90
|
+
f"deciding run with other code is flagged code_changed_after_plan",
|
|
85
91
|
f"claimset lab run --plan {p['id']} {by} -- <the command>"))
|
|
86
92
|
status = {h["id"]: h["status"] for h in s["hypotheses"]}
|
|
87
93
|
for p in s["plans"]:
|
|
88
94
|
open_ = [h for h in p["hypotheses"] if status.get(h) in ("proposed", "testing")]
|
|
89
|
-
if p["kind"] != "exploratory" and p["done"] and open_:
|
|
95
|
+
if p["kind"] != "exploratory" and (p["done"] or p.get("decided")) and not p.get("void") and open_:
|
|
90
96
|
out.append((f"read the verdict of {p['id']} and record it for {', '.join(open_)}",
|
|
91
97
|
f"claimset lab verdict {p['id']}; then claimset lab status {open_[0]} <the verdict> "
|
|
92
98
|
f'--plan {p["id"]} --evidence {" ".join(p["runs"]) or "<its runs>"} --why "…" {by}'))
|
|
@@ -99,7 +105,10 @@ def line(events, actor=None, anchored=True, drafts=None):
|
|
|
99
105
|
"""The next step in one line, or what is left when nothing is."""
|
|
100
106
|
todo = steps(events, actor, anchored, drafts)
|
|
101
107
|
if not todo:
|
|
102
|
-
return ("nothing left to record
|
|
103
|
-
"
|
|
108
|
+
return ("nothing left to record. Before you export, check that every goal of the brief is met: go through "
|
|
109
|
+
"the requirements you listed when you fitted the brief, and for each one find what in the record "
|
|
110
|
+
"meets it (a planned estimate, a test, a diagnostic its runs report, a note); if one is not met, "
|
|
111
|
+
"record why in a note, or agree a plan for it with the supervisor. Then export the claimset "
|
|
112
|
+
"(claimset lab export) and complete it with the claimset-submit skill")
|
|
104
113
|
what, command = todo[0]
|
|
105
114
|
return f"{what}: {command}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Current state of a lab record, for whoever picks up the work (spec §2, principle 8)."""
|
|
2
2
|
|
|
3
|
-
from .core import State, final_statuses, is_withheld, plan_approved
|
|
3
|
+
from .core import State, final_statuses, is_withheld, plan_approved, void_decisions
|
|
4
4
|
|
|
5
5
|
OPEN_STATUSES = ("proposed", "testing")
|
|
6
6
|
|
|
@@ -120,6 +120,7 @@ def build(events):
|
|
|
120
120
|
approvals = {e["body"].get("target") for e in st.events
|
|
121
121
|
if e["type"] == "approval" and not is_withheld(e)}
|
|
122
122
|
plans = []
|
|
123
|
+
voids = void_decisions(st)
|
|
123
124
|
for p in by_type("plan"):
|
|
124
125
|
cur = st.latest(p["id"])
|
|
125
126
|
if is_withheld(cur):
|
|
@@ -137,7 +138,11 @@ def build(events):
|
|
|
137
138
|
"requires_approval": bool(cur["body"].get("requires_approval")),
|
|
138
139
|
"awaiting_approval": bool(cur["body"].get("requires_approval")) and not plan_approved(st, cur["id"]),
|
|
139
140
|
"runs": [r["id"] for r in under],
|
|
140
|
-
"done": any(r["body"].get("exit_status") == "success" for r in under)
|
|
141
|
+
"done": any(r["body"].get("exit_status") == "success" for r in under),
|
|
142
|
+
# its deciding runs were made, whether they succeeded or failed (§5.7.2, L16): it is not run
|
|
143
|
+
# again; void, a later plan stands for it (§9, *Void plans*)
|
|
144
|
+
"decided": st.deciding_runs(p["id"]) is not None,
|
|
145
|
+
"void": p["id"] in voids})
|
|
141
146
|
results = [e for e in st.result_events() if not is_withheld(e)]
|
|
142
147
|
|
|
143
148
|
return {
|
|
@@ -40,6 +40,7 @@ highlights (warning 39).
|
|
|
40
40
|
import re
|
|
41
41
|
|
|
42
42
|
from .validate import (MAX_SHORT_CHARS, OLD_SETUP_ROLES, SCHEMA_VERSION, _named_definitions, as_dict, as_list,
|
|
43
|
+
paper_text, shorten_term,
|
|
43
44
|
bind_quantity, bindable, inherited_assumptions)
|
|
44
45
|
|
|
45
46
|
|
|
@@ -57,10 +58,11 @@ def migrate(doc):
|
|
|
57
58
|
out["schema_version"] = SCHEMA_VERSION
|
|
58
59
|
evidence = {e.get("id"): e for e in out.get("evidence") or [] if isinstance(e, dict)}
|
|
59
60
|
defs = {d.get("id"): d for d in out.get("definitions") or [] if isinstance(d, dict) and isinstance(d.get("id"), str)}
|
|
61
|
+
text = paper_text(out)
|
|
60
62
|
for k in _named_definitions(list(evidence.values()), set(defs)):
|
|
61
63
|
d = defs[k]
|
|
62
64
|
if isinstance(d.get("term"), str) and len(d["term"].strip()) > MAX_SHORT_CHARS and not d.get("symbol") \
|
|
63
|
-
and not d.get("short"):
|
|
65
|
+
and not d.get("short") and shorten_term(d["term"], text) is None:
|
|
64
66
|
todo.append(f"definitions:{k} \"{d['term'].strip()}\" is named in a table or a result: give it a short "
|
|
65
67
|
f"label, at most {MAX_SHORT_CHARS} characters (\"short\", v0.45, §3.2), for the key under the "
|
|
66
68
|
f"table")
|
|
@@ -16,7 +16,7 @@ import contextvars
|
|
|
16
16
|
import decimal
|
|
17
17
|
import json
|
|
18
18
|
|
|
19
|
-
from .validate import inherited_assumptions
|
|
19
|
+
from .validate import MAX_SHORT_CHARS, inherited_assumptions, paper_text, shorten_term
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def _s(x):
|
|
@@ -207,16 +207,32 @@ def _keyed(x, labels, found=None):
|
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
def key_labels(doc):
|
|
210
|
-
"""{definition ID: its brief label}: the `symbol` if it has one, else its `short` (from v0.45), else its term
|
|
210
|
+
"""{definition ID: its brief label}: the `symbol` if it has one, else its `short` (from v0.45), else its term,
|
|
211
|
+
shortened when longer than 30 characters by the rules of §3.2 (*Shortening a term*; validate.shorten_term), or
|
|
212
|
+
whole where they cannot shorten it; two terms that would get the same shortened label get their whole terms
|
|
211
213
|
(spec §2.3 and §3.2)."""
|
|
212
|
-
out = {}
|
|
214
|
+
out, shortened, text = {}, {}, None
|
|
213
215
|
for d in doc.get("definitions") or [] if isinstance(doc.get("definitions"), list) else []:
|
|
214
|
-
if not isinstance(d, dict) or not isinstance(d.get("id"), str):
|
|
216
|
+
if not isinstance(d, dict) or not isinstance(d.get("id"), str) or d["id"] in out:
|
|
215
217
|
continue
|
|
216
218
|
for f in ("symbol", "short", "term"):
|
|
217
219
|
if isinstance(d.get(f), str) and d[f].strip():
|
|
218
|
-
|
|
220
|
+
label = " ".join(d[f].split())
|
|
221
|
+
if f == "term" and len(label) > MAX_SHORT_CHARS:
|
|
222
|
+
text = paper_text(doc) if text is None else text
|
|
223
|
+
short = shorten_term(label, text)
|
|
224
|
+
if short:
|
|
225
|
+
shortened[d["id"]] = (short, label)
|
|
226
|
+
label = short
|
|
227
|
+
out[d["id"]] = label
|
|
219
228
|
break
|
|
229
|
+
seen = {}
|
|
230
|
+
for did, (short, _whole) in shortened.items():
|
|
231
|
+
seen.setdefault(short, []).append(did)
|
|
232
|
+
for short, dids in seen.items():
|
|
233
|
+
if len(dids) > 1: # the same shortened label for two terms: neither is shortened
|
|
234
|
+
for did in dids:
|
|
235
|
+
out[did] = shortened[did][1]
|
|
220
236
|
return out
|
|
221
237
|
|
|
222
238
|
|