Published 2020-05-10T11:59:00.001Z by Physics Derivation Graph
Reading the JSON as text does not work since there are multiple entries that have the key "latex"cat data.json | grep " \"latex\":"
cat data.json |\
python -c "exec(\"import sys, json; expr=json.load(sys.stdin)['expressions'];\nfor i,d in expr.items(): print(str(len(d['latex'])).zfill(3))\")" |\
sort -n |\
cut -c1-2 |\
uniq -c 127 00 63 01 75 02 54 03 34 04 28 05 17 06 18 07 14 08 15 09 11 10 10 11 6 12 5 13 2 14 1 15 1 16 1 18 1 20 2 23 1 27
cat data.json |\
python -c "exec(\"import sys, json; expr=json.load(sys.stdin)['expressions'];\nfor i,d in expr.items(): print(len(d['latex']))\")" |\
sort -n |\
tail -n 5 186 201 231 233 271
cat data.json |\
python -c "exec(\"import sys, json; expr=json.load(sys.stdin)['expressions'];\nfor i,d in expr.items(): print(len(d['latex']))\")" |\
sort -n |\
head -n 5 1 1 1 1 1
cat data.json |\
grep "inf rule" |\
sed 's/"inf rule": //' |\
tr -s " " |\
sort |\
uniq -c |\
sort -n |\
tail -n 10 11 "substitute X for Y", 12 "declare identity", 13 "subtract X from both sides", 14 "declare variable replacement", 20 "declare final expr", 21 "divide both sides by", 21 "substitute LHS of expr 1 into expr 2", 31 "simplify", 31 "substitute RHS of expr 1 into expr 2", 54 "declare initial expr",