Article (canonical .md), step 1: 42 stale numbers brought to the regenerated server sweeps (Tables 3-7, 5.3, 7.1-7.4, section 10), statements that no longer hold rephrased ((2)+(3) not worse than either alone on the wide-bracket set; the best constant-free configuration is no longer defect); the rule of section 3 renamed the base rule; new Section 8 (the flat regime recognised by analogy: the flag, the analogy with its own past, the translation limit, the split from the order, five more readings, the proposed method A', Tables 8-9) and Section 9 (out-of-sample evidence on four more corpora, Tables 10-11); negative results and conclusion renumbered 10-11. Abstract, introduction, conclusion and verify_article still to update.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"""Renumber: the negative results become Section 10 and the conclusion Section 11, making room
|
||||
for the new Sections 8 (the flat regime by analogy) and 9 (out-of-sample evidence). Exact
|
||||
substrings with expected counts; nothing is written unless every one matches.
|
||||
|
||||
python -u apply_article_sections.py
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
PATH = "article/sim_numerics.md"
|
||||
|
||||
REPL = [
|
||||
("(iii) the negative results of §8;", "(iii) the negative results of §10;", 1),
|
||||
("as in item 5 of §8, and", "as in item 5 of §10, and", 1),
|
||||
("(4449 on the canonical set, §8)", "(4449 on the canonical set, §10)", 1),
|
||||
("the curvature-corrected scale of §8 item 5", "the curvature-corrected scale of §10 item 5", 1),
|
||||
("measured and refuted (§8, item 11)", "measured and refuted (§10, item 11)", 1),
|
||||
("## 8. Negative results", "## 10. Negative results", 1),
|
||||
("## 9. Conclusion", "## 11. Conclusion", 1),
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
with open(PATH, encoding="utf8") as fh:
|
||||
text = fh.read()
|
||||
bad = [(o, n, text.count(o)) for o, _new, n in REPL if text.count(o) != n]
|
||||
if bad:
|
||||
for o, n, got in bad:
|
||||
print(f"expected {n}, found {got}: {o}")
|
||||
raise SystemExit("aborted, nothing written")
|
||||
for o, new, _n in REPL:
|
||||
text = text.replace(o, new)
|
||||
with open(PATH, "w", encoding="utf8") as fh:
|
||||
fh.write(text)
|
||||
print("sections renumbered")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user