physics-typst-corpus / scripts /_tmp_counts.py
孟祥瑞
上传 physics-typst 语料(源码/文档,排除PDF等二进制)
e2cb4b5 verified
Raw History Blame Contribute Delete
248 Bytes
import re
s = open(r"E:\phys\papers\2203.02139\main.typ", encoding="utf-8").read().split("\n")
for i in (25, 29, 33, 53, 55, 59, 111, 116, 118):
l = s[i-1]
print(i, "@count", len(re.findall(r"@[A-Za-z]", l)), "holes", l.count("#text([])"))