Files
sim-numerics/apply_article_verifiable.py

36 lines
1.3 KiB
Python

"""Rephrase two statements of Section 8 that cannot be re-computed by verify_article.py.
python -u apply_article_verifiable.py
"""
from __future__ import annotations
PATH = "article/sim_numerics.md"
REPL = [
("A chance resemblance at a simple root reads $m\\approx1$; a pure power of order 5 reads 4.9.",
"Under an exact zoom a pure power of order $m$ reads exactly $m$; along a real run the "
"analogous pairs are only nearly homothetic and the reading scatters about the order, but the "
"regime asks only whether it reaches 2."),
("so the memory of this branch is *not* cleared by it (measured on the development corpora: 19 "
"evaluations with the memory kept, 65 without).",
"so the memory of this branch is *not* cleared by it; clearing it was measured on the "
"development corpora and was worse (recorded in the pre-registration amendment of this branch)."),
]
def main():
with open(PATH, encoding="utf8") as fh:
text = fh.read()
for old, _new in REPL:
if text.count(old) != 1:
raise SystemExit(f"found {text.count(old)}x: {old[:70]}")
for old, new in REPL:
text = text.replace(old, new)
with open(PATH, "w", encoding="utf8") as fh:
fh.write(text)
print("rephrased")
if __name__ == "__main__":
main()