mathcheck-bench 0.1.0__py3-none-any.whl
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.
- mathcheck_bench/__init__.py +7 -0
- mathcheck_bench/cases.py +47 -0
- mathcheck_bench/checkers.py +67 -0
- mathcheck_bench/cli.py +76 -0
- mathcheck_bench/data/cases.jsonl +302 -0
- mathcheck_bench/runner.py +72 -0
- mathcheck_bench-0.1.0.dist-info/METADATA +145 -0
- mathcheck_bench-0.1.0.dist-info/RECORD +11 -0
- mathcheck_bench-0.1.0.dist-info/WHEEL +4 -0
- mathcheck_bench-0.1.0.dist-info/entry_points.txt +2 -0
- mathcheck_bench-0.1.0.dist-info/licenses/LICENSE +202 -0
mathcheck_bench/cases.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Load the labeled test cases that ship with the package."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
from importlib import resources
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
from typing import List, Optional, Union
|
|
10
|
+
|
|
11
|
+
REQUIRED_FIELDS = ("id", "category", "reference", "answer", "equivalent", "note")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True)
|
|
15
|
+
class Case:
|
|
16
|
+
"""One labeled pair: is `answer` mathematically equivalent to `reference`?"""
|
|
17
|
+
|
|
18
|
+
id: str
|
|
19
|
+
category: str
|
|
20
|
+
reference: str
|
|
21
|
+
answer: str
|
|
22
|
+
equivalent: bool
|
|
23
|
+
note: str
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def load_cases(path: Optional[Union[str, Path]] = None) -> List[Case]:
|
|
27
|
+
"""Read cases from a JSONL file (one JSON object per line).
|
|
28
|
+
|
|
29
|
+
With no path, reads the suite bundled with the package.
|
|
30
|
+
"""
|
|
31
|
+
if path is None:
|
|
32
|
+
text = resources.files("mathcheck_bench").joinpath("data/cases.jsonl").read_text("utf-8")
|
|
33
|
+
else:
|
|
34
|
+
text = Path(path).read_text("utf-8")
|
|
35
|
+
|
|
36
|
+
cases = []
|
|
37
|
+
for lineno, line in enumerate(text.splitlines(), start=1):
|
|
38
|
+
if not line.strip():
|
|
39
|
+
continue
|
|
40
|
+
row = json.loads(line)
|
|
41
|
+
missing = [f for f in REQUIRED_FIELDS if f not in row]
|
|
42
|
+
if missing:
|
|
43
|
+
raise ValueError(f"line {lineno}: missing fields {missing}")
|
|
44
|
+
if not isinstance(row["equivalent"], bool):
|
|
45
|
+
raise ValueError(f"line {lineno}: 'equivalent' must be true or false")
|
|
46
|
+
cases.append(Case(**{f: row[f] for f in REQUIRED_FIELDS}))
|
|
47
|
+
return cases
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Adapters that give every checker the same shape: (reference, answer) -> bool.
|
|
2
|
+
|
|
3
|
+
To test your own checker, write one function with that signature and pass it
|
|
4
|
+
to `mathcheck_bench.run`, or name it on the command line as `module:function`.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import importlib
|
|
10
|
+
import re
|
|
11
|
+
from typing import Callable, Dict
|
|
12
|
+
|
|
13
|
+
Checker = Callable[[str, str], bool]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def string_normalize(reference: str, answer: str) -> bool:
|
|
17
|
+
"""A deliberately simple baseline: strip spaces, $, \\boxed, trailing dots."""
|
|
18
|
+
|
|
19
|
+
def norm(s: str) -> str:
|
|
20
|
+
s = s.strip().strip("$")
|
|
21
|
+
m = re.fullmatch(r"\\boxed\{(.*)\}", s)
|
|
22
|
+
if m:
|
|
23
|
+
s = m.group(1)
|
|
24
|
+
s = s.replace("\\dfrac", "\\frac").replace("\\tfrac", "\\frac")
|
|
25
|
+
s = re.sub(r"\s+", "", s)
|
|
26
|
+
return s.rstrip(".")
|
|
27
|
+
|
|
28
|
+
return norm(reference) == norm(answer)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def sympy_basic(reference: str, answer: str) -> bool:
|
|
32
|
+
"""Parse both sides with SymPy's LaTeX parser and check the difference simplifies to 0.
|
|
33
|
+
|
|
34
|
+
Uses SymPy's Lark backend, which avoids the antlr4 version clash with Math-Verify.
|
|
35
|
+
"""
|
|
36
|
+
import sympy
|
|
37
|
+
from sympy.parsing.latex import parse_latex
|
|
38
|
+
|
|
39
|
+
a = parse_latex(reference, backend="lark")
|
|
40
|
+
b = parse_latex(answer, backend="lark")
|
|
41
|
+
return sympy.simplify(a - b) == 0
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def math_verify(reference: str, answer: str) -> bool:
|
|
45
|
+
"""Hugging Face Math-Verify. Bare answers are wrapped in $...$ so it can extract them."""
|
|
46
|
+
from math_verify import parse, verify
|
|
47
|
+
|
|
48
|
+
gold = parse(f"${reference}$")
|
|
49
|
+
pred = parse(f"${answer}$")
|
|
50
|
+
return bool(verify(gold, pred))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
BUILTIN: Dict[str, Checker] = {
|
|
54
|
+
"string-normalize": string_normalize,
|
|
55
|
+
"sympy-basic": sympy_basic,
|
|
56
|
+
"math-verify": math_verify,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def get_checker(name: str) -> Checker:
|
|
61
|
+
"""Look up a built-in checker by name, or import one given as 'module:function'."""
|
|
62
|
+
if name in BUILTIN:
|
|
63
|
+
return BUILTIN[name]
|
|
64
|
+
if ":" in name:
|
|
65
|
+
module, func = name.split(":", 1)
|
|
66
|
+
return getattr(importlib.import_module(module), func)
|
|
67
|
+
raise KeyError(f"unknown checker {name!r}; built-ins: {', '.join(BUILTIN)}")
|
mathcheck_bench/cli.py
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""Command line: `mathcheck-bench run --checker math-verify`."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import sys
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
|
|
9
|
+
from .cases import load_cases
|
|
10
|
+
from .checkers import BUILTIN, get_checker
|
|
11
|
+
from .runner import Scorecard, run
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def print_scorecard(card: Scorecard, show_failures: bool) -> None:
|
|
15
|
+
print(f"\n== {card.checker} ==")
|
|
16
|
+
print(f"{'category':<22}{'correct':>10}{'errors':>8}")
|
|
17
|
+
for cat, row in card.by_category().items():
|
|
18
|
+
print(f"{cat:<22}{row['correct']:>5}/{row['total']:<4}{row['errors']:>8}")
|
|
19
|
+
print(f"{'overall':<22}{card.accuracy:>9.1%}{len(card.errors):>8}")
|
|
20
|
+
print(f"false accepts: {len(card.false_accepts)} false rejects: {len(card.false_rejects)}")
|
|
21
|
+
if show_failures:
|
|
22
|
+
for r in card.failures:
|
|
23
|
+
kind = "false accept" if r.verdict else "false reject"
|
|
24
|
+
print(f" {kind:<13} {r.case.id}: {r.case.reference!r} vs {r.case.answer!r}")
|
|
25
|
+
for r in card.errors:
|
|
26
|
+
print(f" error {r.case.id}: {r.error}")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def markdown_table(cards: List[Scorecard]) -> str:
|
|
30
|
+
"""A per-category comparison table, ready to paste into a README."""
|
|
31
|
+
cats = sorted({c for card in cards for c in card.by_category()})
|
|
32
|
+
lines = ["| Category | Cases | " + " | ".join(c.checker for c in cards) + " |",
|
|
33
|
+
"|---|---:|" + "---:|" * len(cards)]
|
|
34
|
+
for cat in cats:
|
|
35
|
+
total = cards[0].by_category()[cat]["total"]
|
|
36
|
+
cells = [f"{card.by_category()[cat]['correct'] / total:.0%}" for card in cards]
|
|
37
|
+
lines.append(f"| {cat} | {total} | " + " | ".join(cells) + " |")
|
|
38
|
+
n = len(cards[0].results)
|
|
39
|
+
lines.append(f"| **overall** | **{n}** | " + " | ".join(f"**{c.accuracy:.1%}**" for c in cards) + " |")
|
|
40
|
+
lines.append("| false accepts | | " + " | ".join(str(len(c.false_accepts)) for c in cards) + " |")
|
|
41
|
+
lines.append("| false rejects | | " + " | ".join(str(len(c.false_rejects)) for c in cards) + " |")
|
|
42
|
+
lines.append("| crashed | | " + " | ".join(str(len(c.errors)) for c in cards) + " |")
|
|
43
|
+
return "\n".join(lines)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def main(argv: Optional[List[str]] = None) -> int:
|
|
47
|
+
parser = argparse.ArgumentParser(prog="mathcheck-bench")
|
|
48
|
+
sub = parser.add_subparsers(dest="command", required=True)
|
|
49
|
+
p_run = sub.add_parser("run", help="score a checker on the suite")
|
|
50
|
+
p_run.add_argument("--checker", required=True,
|
|
51
|
+
help=f"'all', a built-in ({', '.join(BUILTIN)}), or module:function")
|
|
52
|
+
p_run.add_argument("--cases", help="path to a JSONL file (default: bundled suite)")
|
|
53
|
+
p_run.add_argument("--failures", action="store_true", help="list every wrong or crashed case")
|
|
54
|
+
p_run.add_argument("--format", choices=["text", "markdown"], default="text")
|
|
55
|
+
args = parser.parse_args(argv)
|
|
56
|
+
|
|
57
|
+
cases = load_cases(args.cases)
|
|
58
|
+
names = list(BUILTIN) if args.checker == "all" else [args.checker]
|
|
59
|
+
cards = []
|
|
60
|
+
for name in names:
|
|
61
|
+
try:
|
|
62
|
+
checker = get_checker(name)
|
|
63
|
+
except (KeyError, ImportError, AttributeError) as exc:
|
|
64
|
+
print(f"cannot load checker {name!r}: {exc}", file=sys.stderr)
|
|
65
|
+
return 2
|
|
66
|
+
cards.append(run(checker, name, cases))
|
|
67
|
+
if args.format == "markdown":
|
|
68
|
+
print(markdown_table(cards))
|
|
69
|
+
else:
|
|
70
|
+
for card in cards:
|
|
71
|
+
print_scorecard(card, args.failures)
|
|
72
|
+
return 0
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
if __name__ == "__main__":
|
|
76
|
+
sys.exit(main())
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
{"id": "frac-001", "category": "fraction_decimal", "reference": "\\frac{1}{2}", "answer": "0.5", "equivalent": true, "note": "LaTeX fraction vs decimal"}
|
|
2
|
+
{"id": "frac-002", "category": "fraction_decimal", "reference": "1/2", "answer": "\\dfrac{1}{2}", "equivalent": true, "note": "\\dfrac is display-style \\frac"}
|
|
3
|
+
{"id": "frac-003", "category": "fraction_decimal", "reference": "\\frac{2}{4}", "answer": "\\frac{1}{2}", "equivalent": true, "note": "unreduced fraction in the reference"}
|
|
4
|
+
{"id": "frac-004", "category": "fraction_decimal", "reference": "\\frac{1}{3}", "answer": "0.33", "equivalent": false, "note": "a rounded decimal is not exactly 1/3"}
|
|
5
|
+
{"id": "frac-005", "category": "fraction_decimal", "reference": "\\frac{3}{4}", "answer": "75\\%", "equivalent": true, "note": "percent form of the same number"}
|
|
6
|
+
{"id": "fmt-001", "category": "latex_format", "reference": "\\sqrt{2}", "answer": "2^{1/2}", "equivalent": true, "note": "root vs fractional power"}
|
|
7
|
+
{"id": "fmt-002", "category": "latex_format", "reference": "2\\sqrt{3}", "answer": "\\sqrt{12}", "equivalent": true, "note": "simplified vs unsimplified radical"}
|
|
8
|
+
{"id": "fmt-003", "category": "latex_format", "reference": "\\pi", "answer": "π", "equivalent": true, "note": "LaTeX command vs Unicode symbol"}
|
|
9
|
+
{"id": "fmt-004", "category": "latex_format", "reference": "10", "answer": "\\boxed{10}", "equivalent": true, "note": "answer still wrapped in \\boxed"}
|
|
10
|
+
{"id": "fmt-005", "category": "latex_format", "reference": "x^2+2x+1", "answer": "(x+1)^2", "equivalent": true, "note": "expanded vs factored polynomial"}
|
|
11
|
+
{"id": "ws-001", "category": "whitespace_punct", "reference": "42", "answer": "42.", "equivalent": true, "note": "trailing period from the end of a sentence"}
|
|
12
|
+
{"id": "ws-002", "category": "whitespace_punct", "reference": "1000000", "answer": "1,000,000", "equivalent": true, "note": "thousands separators"}
|
|
13
|
+
{"id": "ws-003", "category": "whitespace_punct", "reference": "x+1", "answer": " x + 1 ", "equivalent": true, "note": "extra spaces"}
|
|
14
|
+
{"id": "unit-001", "category": "units", "reference": "180 \\text{ minutes}", "answer": "3 \\text{ hours}", "equivalent": true, "note": "same duration in different units"}
|
|
15
|
+
{"id": "unit-002", "category": "units", "reference": "5", "answer": "5 \\text{ cm}", "equivalent": true, "note": "unit added when the reference has none"}
|
|
16
|
+
{"id": "unit-003", "category": "units", "reference": "5 \\text{ m}", "answer": "5 \\text{ cm}", "equivalent": false, "note": "same number, different unit"}
|
|
17
|
+
{"id": "ang-001", "category": "angles", "reference": "\\frac{\\pi}{4}", "answer": "45^\\circ", "equivalent": true, "note": "radians vs degrees"}
|
|
18
|
+
{"id": "ang-002", "category": "angles", "reference": "90^\\circ", "answer": "90", "equivalent": true, "note": "degree sign dropped"}
|
|
19
|
+
{"id": "int-001", "category": "intervals_sets", "reference": "(0, 1]", "answer": "0 < x \\le 1", "equivalent": true, "note": "interval vs inequality"}
|
|
20
|
+
{"id": "int-002", "category": "intervals_sets", "reference": "(0, 1]", "answer": "[0, 1]", "equivalent": false, "note": "open vs closed endpoint"}
|
|
21
|
+
{"id": "int-003", "category": "intervals_sets", "reference": "\\{1, 2, 3\\}", "answer": "\\{3, 2, 1\\}", "equivalent": true, "note": "set order does not matter"}
|
|
22
|
+
{"id": "comb-001", "category": "combinatorics", "reference": "\\binom{5}{2}", "answer": "10", "equivalent": true, "note": "binomial coefficient vs its value"}
|
|
23
|
+
{"id": "comb-002", "category": "combinatorics", "reference": "\\binom{n}{2}", "answer": "\\frac{n(n-1)}{2}", "equivalent": true, "note": "symbolic binomial vs formula"}
|
|
24
|
+
{"id": "comb-003", "category": "combinatorics", "reference": "5!", "answer": "120", "equivalent": true, "note": "factorial vs its value"}
|
|
25
|
+
{"id": "big-001", "category": "large_numbers", "reference": "123456", "answer": "123457", "equivalent": false, "note": "off by one at large magnitude; relative tolerance may wrongly accept"}
|
|
26
|
+
{"id": "big-002", "category": "large_numbers", "reference": "2^{20}", "answer": "1048576", "equivalent": true, "note": "power vs its value"}
|
|
27
|
+
{"id": "big-003", "category": "large_numbers", "reference": "3 \\times 10^{8}", "answer": "300000000", "equivalent": true, "note": "scientific notation"}
|
|
28
|
+
{"id": "multi-001", "category": "multiple_answers", "reference": "x = 2, x = -2", "answer": "x = \\pm 2", "equivalent": true, "note": "plus-minus shorthand"}
|
|
29
|
+
{"id": "multi-002", "category": "multiple_answers", "reference": "-2, 2", "answer": "2, -2", "equivalent": true, "note": "order of solutions does not matter"}
|
|
30
|
+
{"id": "multi-003", "category": "multiple_answers", "reference": "-2, 2", "answer": "2", "equivalent": false, "note": "missing one solution"}
|
|
31
|
+
{"id": "frac-006", "category": "fraction_decimal", "reference": "\\frac{1}{3}", "answer": "0.\\overline{3}", "equivalent": true, "note": "repeating decimal written with an overline"}
|
|
32
|
+
{"id": "frac-007", "category": "fraction_decimal", "reference": "\\frac{1}{4}", "answer": "0.25", "equivalent": true, "note": "fraction vs terminating decimal"}
|
|
33
|
+
{"id": "frac-008", "category": "fraction_decimal", "reference": "\\frac{1}{8}", "answer": "0.125", "equivalent": true, "note": "fraction vs three-digit decimal"}
|
|
34
|
+
{"id": "frac-009", "category": "fraction_decimal", "reference": "\\frac{2}{3}", "answer": "0.67", "equivalent": false, "note": "rounded decimal is not exact"}
|
|
35
|
+
{"id": "frac-010", "category": "fraction_decimal", "reference": "\\frac{2}{3}", "answer": "0.\\overline{6}", "equivalent": true, "note": "repeating decimal with overline"}
|
|
36
|
+
{"id": "frac-011", "category": "fraction_decimal", "reference": "\\frac{1}{7}", "answer": "0.142857", "equivalent": false, "note": "truncated repeating decimal is not exact"}
|
|
37
|
+
{"id": "frac-012", "category": "fraction_decimal", "reference": "\\frac{5}{2}", "answer": "2\\frac{1}{2}", "equivalent": true, "note": "mixed number; a naive parser reads it as 2 times 1/2"}
|
|
38
|
+
{"id": "frac-013", "category": "fraction_decimal", "reference": "\\frac{7}{4}", "answer": "1.75", "equivalent": true, "note": "improper fraction vs decimal"}
|
|
39
|
+
{"id": "frac-014", "category": "fraction_decimal", "reference": "-\\frac{1}{2}", "answer": "\\frac{-1}{2}", "equivalent": true, "note": "minus sign moved into numerator"}
|
|
40
|
+
{"id": "frac-015", "category": "fraction_decimal", "reference": "-\\frac{1}{2}", "answer": "\\frac{1}{-2}", "equivalent": true, "note": "minus sign moved into denominator"}
|
|
41
|
+
{"id": "frac-016", "category": "fraction_decimal", "reference": "\\frac{1}{2}", "answer": "-\\frac{1}{2}", "equivalent": false, "note": "sign error"}
|
|
42
|
+
{"id": "frac-017", "category": "fraction_decimal", "reference": "\\frac{3}{5}", "answer": "60\\%", "equivalent": true, "note": "percent form"}
|
|
43
|
+
{"id": "frac-018", "category": "fraction_decimal", "reference": "0.5", "answer": "5\\%", "equivalent": false, "note": "percent with wrong magnitude"}
|
|
44
|
+
{"id": "frac-019", "category": "fraction_decimal", "reference": "\\frac{1}{2}", "answer": "50", "equivalent": false, "note": "percent sign missing changes the value"}
|
|
45
|
+
{"id": "frac-020", "category": "fraction_decimal", "reference": "0.1", "answer": "\\frac{1}{10}", "equivalent": true, "note": "decimal vs fraction"}
|
|
46
|
+
{"id": "frac-021", "category": "fraction_decimal", "reference": "\\frac{22}{7}", "answer": "\\pi", "equivalent": false, "note": "a famous approximation is not the exact value"}
|
|
47
|
+
{"id": "frac-022", "category": "fraction_decimal", "reference": "\\frac{4}{2}", "answer": "2", "equivalent": true, "note": "fraction that is an integer"}
|
|
48
|
+
{"id": "frac-023", "category": "fraction_decimal", "reference": "2", "answer": "2.0", "equivalent": true, "note": "trailing zero"}
|
|
49
|
+
{"id": "frac-024", "category": "fraction_decimal", "reference": "2", "answer": "2.00", "equivalent": true, "note": "two trailing zeros"}
|
|
50
|
+
{"id": "frac-025", "category": "fraction_decimal", "reference": "\\frac{1}{3}", "answer": "0.3333333333", "equivalent": false, "note": "long truncated decimal is still not exact"}
|
|
51
|
+
{"id": "frac-026", "category": "fraction_decimal", "reference": "1.5", "answer": "\\frac{3}{2}", "equivalent": true, "note": "decimal reference, fraction answer"}
|
|
52
|
+
{"id": "frac-027", "category": "fraction_decimal", "reference": "0.05", "answer": "\\frac{1}{20}", "equivalent": true, "note": "small decimal vs fraction"}
|
|
53
|
+
{"id": "frac-028", "category": "fraction_decimal", "reference": "\\frac{3}{4}", "answer": "\\frac{9}{12}", "equivalent": true, "note": "unreduced fraction in the answer"}
|
|
54
|
+
{"id": "fmt-006", "category": "latex_format", "reference": "\\frac{1}{2}", "answer": "\\tfrac{1}{2}", "equivalent": true, "note": "\\tfrac is text-style \\frac"}
|
|
55
|
+
{"id": "fmt-007", "category": "latex_format", "reference": "\\frac{1}{2}", "answer": "\\frac12", "equivalent": true, "note": "brace-less fraction shorthand"}
|
|
56
|
+
{"id": "fmt-008", "category": "latex_format", "reference": "\\sqrt{2}", "answer": "\\sqrt2", "equivalent": true, "note": "brace-less square root"}
|
|
57
|
+
{"id": "fmt-009", "category": "latex_format", "reference": "\\sqrt{3}", "answer": "\\sqrt[2]{3}", "equivalent": true, "note": "explicit square root index"}
|
|
58
|
+
{"id": "fmt-010", "category": "latex_format", "reference": "\\sqrt[3]{8}", "answer": "2", "equivalent": true, "note": "cube root evaluated"}
|
|
59
|
+
{"id": "fmt-011", "category": "latex_format", "reference": "2\\sqrt{2}", "answer": "\\sqrt{8}", "equivalent": true, "note": "simplified vs unsimplified radical"}
|
|
60
|
+
{"id": "fmt-012", "category": "latex_format", "reference": "\\frac{\\sqrt{2}}{2}", "answer": "\\frac{1}{\\sqrt{2}}", "equivalent": true, "note": "rationalized vs unrationalized denominator"}
|
|
61
|
+
{"id": "fmt-013", "category": "latex_format", "reference": "\\frac{\\sqrt{2}}{2}", "answer": "\\sqrt{2}", "equivalent": false, "note": "missing division by 2"}
|
|
62
|
+
{"id": "fmt-014", "category": "latex_format", "reference": "x^{2}", "answer": "x^2", "equivalent": true, "note": "braces around a one-character exponent"}
|
|
63
|
+
{"id": "fmt-015", "category": "latex_format", "reference": "\\left(x+1\\right)^2", "answer": "(x+1)^2", "equivalent": true, "note": "\\left and \\right delimiters"}
|
|
64
|
+
{"id": "fmt-016", "category": "latex_format", "reference": "10", "answer": "\\mathbf{10}", "equivalent": true, "note": "bold math formatting"}
|
|
65
|
+
{"id": "fmt-017", "category": "latex_format", "reference": "10", "answer": "\\textbf{10}", "equivalent": true, "note": "bold text formatting"}
|
|
66
|
+
{"id": "fmt-018", "category": "latex_format", "reference": "10", "answer": "\\text{10}", "equivalent": true, "note": "number wrapped in \\text"}
|
|
67
|
+
{"id": "fmt-019", "category": "latex_format", "reference": "3", "answer": "\\boxed{\\boxed{3}}", "equivalent": true, "note": "nested \\boxed"}
|
|
68
|
+
{"id": "fmt-020", "category": "latex_format", "reference": "6", "answer": "\\boxed{6}.", "equivalent": true, "note": "boxed answer followed by a period"}
|
|
69
|
+
{"id": "fmt-021", "category": "latex_format", "reference": "x^2+2x+1", "answer": "x^2+2x+2", "equivalent": false, "note": "differs by a constant"}
|
|
70
|
+
{"id": "fmt-022", "category": "latex_format", "reference": "(x+1)^2", "answer": "(x-1)^2", "equivalent": false, "note": "sign error inside the square"}
|
|
71
|
+
{"id": "fmt-023", "category": "latex_format", "reference": "\\sqrt{2}", "answer": "1.414", "equivalent": false, "note": "decimal approximation of an irrational number"}
|
|
72
|
+
{"id": "fmt-024", "category": "latex_format", "reference": "2\\sqrt{3}", "answer": "3\\sqrt{2}", "equivalent": false, "note": "coefficient and radicand swapped"}
|
|
73
|
+
{"id": "fmt-025", "category": "latex_format", "reference": "\\frac{1}{2}", "answer": "\\frac{2}{1}", "equivalent": false, "note": "inverted fraction"}
|
|
74
|
+
{"id": "fmt-026", "category": "latex_format", "reference": "e^{x}", "answer": "\\exp(x)", "equivalent": true, "note": "exp notation"}
|
|
75
|
+
{"id": "fmt-027", "category": "latex_format", "reference": "\\ln 2", "answer": "\\log_e 2", "equivalent": true, "note": "natural log written with base e"}
|
|
76
|
+
{"id": "fmt-028", "category": "latex_format", "reference": "\\log_{2} 8", "answer": "3", "equivalent": true, "note": "logarithm evaluated"}
|
|
77
|
+
{"id": "ws-004", "category": "whitespace_punct", "reference": "5", "answer": "5\\,", "equivalent": true, "note": "trailing LaTeX thin space"}
|
|
78
|
+
{"id": "ws-005", "category": "whitespace_punct", "reference": "1000", "answer": "1\\,000", "equivalent": true, "note": "thin-space thousands separator"}
|
|
79
|
+
{"id": "ws-006", "category": "whitespace_punct", "reference": "1000", "answer": "1 000", "equivalent": true, "note": "space as thousands separator"}
|
|
80
|
+
{"id": "ws-007", "category": "whitespace_punct", "reference": "12", "answer": "12,", "equivalent": true, "note": "trailing comma"}
|
|
81
|
+
{"id": "ws-008", "category": "whitespace_punct", "reference": "7", "answer": "7;", "equivalent": true, "note": "trailing semicolon"}
|
|
82
|
+
{"id": "ws-009", "category": "whitespace_punct", "reference": "7", "answer": " 7\n", "equivalent": true, "note": "surrounding whitespace and newline"}
|
|
83
|
+
{"id": "ws-010", "category": "whitespace_punct", "reference": "1234", "answer": "1,234", "equivalent": true, "note": "comma thousands separator"}
|
|
84
|
+
{"id": "ws-011", "category": "whitespace_punct", "reference": "12345", "answer": "12,345.", "equivalent": true, "note": "separator plus trailing period"}
|
|
85
|
+
{"id": "ws-012", "category": "whitespace_punct", "reference": "1.5", "answer": "1.5.", "equivalent": true, "note": "trailing period after a decimal"}
|
|
86
|
+
{"id": "ws-013", "category": "whitespace_punct", "reference": "4", "answer": "(4)", "equivalent": true, "note": "parentheses around a number"}
|
|
87
|
+
{"id": "ws-014", "category": "whitespace_punct", "reference": "4", "answer": "4!", "equivalent": false, "note": "exclamation mark is a factorial, not punctuation"}
|
|
88
|
+
{"id": "ws-015", "category": "whitespace_punct", "reference": "-3", "answer": "−3", "equivalent": true, "note": "Unicode minus sign"}
|
|
89
|
+
{"id": "ws-016", "category": "whitespace_punct", "reference": "-3", "answer": "- 3", "equivalent": true, "note": "space after minus sign"}
|
|
90
|
+
{"id": "ws-017", "category": "whitespace_punct", "reference": "x-1", "answer": "x−1", "equivalent": true, "note": "Unicode minus inside an expression"}
|
|
91
|
+
{"id": "ws-018", "category": "whitespace_punct", "reference": "3", "answer": "3 .", "equivalent": true, "note": "space before trailing period"}
|
|
92
|
+
{"id": "ws-019", "category": "whitespace_punct", "reference": "0.5", "answer": ".5", "equivalent": true, "note": "missing leading zero"}
|
|
93
|
+
{"id": "ws-020", "category": "whitespace_punct", "reference": "12", "answer": "1,2", "equivalent": false, "note": "comma between digits that is not a thousands separator"}
|
|
94
|
+
{"id": "unit-004", "category": "units", "reference": "2 \\text{ km}", "answer": "2000 \\text{ m}", "equivalent": true, "note": "kilometres vs metres"}
|
|
95
|
+
{"id": "unit-005", "category": "units", "reference": "1 \\text{ m}", "answer": "100 \\text{ cm}", "equivalent": true, "note": "metres vs centimetres"}
|
|
96
|
+
{"id": "unit-006", "category": "units", "reference": "1 \\text{ m}", "answer": "10 \\text{ cm}", "equivalent": false, "note": "wrong conversion factor"}
|
|
97
|
+
{"id": "unit-007", "category": "units", "reference": "60 \\text{ km/h}", "answer": "1 \\text{ km/min}", "equivalent": true, "note": "rate conversion"}
|
|
98
|
+
{"id": "unit-008", "category": "units", "reference": "1 \\text{ kg}", "answer": "1000 \\text{ g}", "equivalent": true, "note": "mass conversion"}
|
|
99
|
+
{"id": "unit-009", "category": "units", "reference": "1 \\text{ kg}", "answer": "1 \\text{ g}", "equivalent": false, "note": "same number, different mass unit"}
|
|
100
|
+
{"id": "unit-010", "category": "units", "reference": "2 \\text{ hours}", "answer": "120 \\text{ minutes}", "equivalent": true, "note": "time conversion"}
|
|
101
|
+
{"id": "unit-011", "category": "units", "reference": "90 \\text{ seconds}", "answer": "1.5 \\text{ minutes}", "equivalent": true, "note": "time conversion with a decimal"}
|
|
102
|
+
{"id": "unit-012", "category": "units", "reference": "1 \\text{ hour}", "answer": "60 \\text{ seconds}", "equivalent": false, "note": "wrong time unit"}
|
|
103
|
+
{"id": "unit-013", "category": "units", "reference": "5 \\text{ cm}", "answer": "5\\text{cm}", "equivalent": true, "note": "no space before the unit"}
|
|
104
|
+
{"id": "unit-014", "category": "units", "reference": "5 \\text{ cm}", "answer": "5 \\mathrm{cm}", "equivalent": true, "note": "unit in \\mathrm"}
|
|
105
|
+
{"id": "unit-015", "category": "units", "reference": "5 \\text{ cm}", "answer": "5 cm", "equivalent": true, "note": "plain-text unit"}
|
|
106
|
+
{"id": "unit-016", "category": "units", "reference": "12 \\text{ cm}^2", "answer": "12 \\text{ cm}", "equivalent": false, "note": "area unit vs length unit"}
|
|
107
|
+
{"id": "unit-017", "category": "units", "reference": "12 \\text{ cm}^2", "answer": "1200 \\text{ mm}^2", "equivalent": true, "note": "squared unit conversion"}
|
|
108
|
+
{"id": "unit-018", "category": "units", "reference": "1 \\text{ m}^2", "answer": "100 \\text{ cm}^2", "equivalent": false, "note": "linear factor wrongly applied to an area"}
|
|
109
|
+
{"id": "unit-019", "category": "units", "reference": "\\$5", "answer": "5 \\text{ dollars}", "equivalent": true, "note": "currency symbol vs word"}
|
|
110
|
+
{"id": "unit-020", "category": "units", "reference": "\\$5", "answer": "5", "equivalent": true, "note": "currency symbol dropped"}
|
|
111
|
+
{"id": "unit-021", "category": "units", "reference": "\\$5.00", "answer": "\\$5", "equivalent": true, "note": "cents written out"}
|
|
112
|
+
{"id": "unit-022", "category": "units", "reference": "\\$50", "answer": "50 \\text{ cents}", "equivalent": false, "note": "dollars vs cents"}
|
|
113
|
+
{"id": "unit-023", "category": "units", "reference": "3 \\text{ apples}", "answer": "3", "equivalent": true, "note": "counting noun dropped"}
|
|
114
|
+
{"id": "unit-024", "category": "units", "reference": "25^\\circ\\text{C}", "answer": "77^\\circ\\text{F}", "equivalent": true, "note": "temperature conversion"}
|
|
115
|
+
{"id": "unit-025", "category": "units", "reference": "0^\\circ\\text{C}", "answer": "0^\\circ\\text{F}", "equivalent": false, "note": "same number, different temperature scale"}
|
|
116
|
+
{"id": "unit-026", "category": "units", "reference": "500 \\text{ mL}", "answer": "0.5 \\text{ L}", "equivalent": true, "note": "volume conversion"}
|
|
117
|
+
{"id": "ang-003", "category": "angles", "reference": "\\frac{\\pi}{2}", "answer": "90^\\circ", "equivalent": true, "note": "radians vs degrees"}
|
|
118
|
+
{"id": "ang-004", "category": "angles", "reference": "\\pi", "answer": "180^\\circ", "equivalent": true, "note": "pi radians vs degrees"}
|
|
119
|
+
{"id": "ang-005", "category": "angles", "reference": "\\frac{\\pi}{3}", "answer": "60^{\\circ}", "equivalent": true, "note": "braced degree superscript"}
|
|
120
|
+
{"id": "ang-006", "category": "angles", "reference": "\\frac{\\pi}{6}", "answer": "30°", "equivalent": true, "note": "Unicode degree sign"}
|
|
121
|
+
{"id": "ang-007", "category": "angles", "reference": "\\frac{\\pi}{6}", "answer": "60^\\circ", "equivalent": false, "note": "wrong angle"}
|
|
122
|
+
{"id": "ang-008", "category": "angles", "reference": "45^\\circ", "answer": "45 degrees", "equivalent": true, "note": "degrees spelled out"}
|
|
123
|
+
{"id": "ang-009", "category": "angles", "reference": "45^\\circ", "answer": "45\\degree", "equivalent": true, "note": "\\degree macro"}
|
|
124
|
+
{"id": "ang-010", "category": "angles", "reference": "2\\pi", "answer": "360^\\circ", "equivalent": true, "note": "full turn"}
|
|
125
|
+
{"id": "ang-011", "category": "angles", "reference": "30^\\circ", "answer": "\\frac{\\pi}{6} \\text{ rad}", "equivalent": true, "note": "explicit rad unit"}
|
|
126
|
+
{"id": "ang-012", "category": "angles", "reference": "1 \\text{ rad}", "answer": "1^\\circ", "equivalent": false, "note": "same number, radians vs degrees"}
|
|
127
|
+
{"id": "ang-013", "category": "angles", "reference": "\\frac{3\\pi}{4}", "answer": "135^\\circ", "equivalent": true, "note": "obtuse angle in radians vs degrees"}
|
|
128
|
+
{"id": "ang-014", "category": "angles", "reference": "\\frac{3\\pi}{4}", "answer": "\\frac{3}{4}\\pi", "equivalent": true, "note": "coefficient outside the fraction"}
|
|
129
|
+
{"id": "ang-015", "category": "angles", "reference": "\\frac{3\\pi}{4}", "answer": "2.356", "equivalent": false, "note": "decimal approximation of radians"}
|
|
130
|
+
{"id": "ang-016", "category": "angles", "reference": "-\\frac{\\pi}{2}", "answer": "\\frac{3\\pi}{2}", "equivalent": false, "note": "coterminal angle is a different value unless the problem allows it"}
|
|
131
|
+
{"id": "ang-017", "category": "angles", "reference": "90^\\circ", "answer": "\\frac{\\pi}{2}", "equivalent": true, "note": "degrees reference, radians answer (reverse direction)"}
|
|
132
|
+
{"id": "ang-018", "category": "angles", "reference": "0.5^\\circ", "answer": "30'", "equivalent": true, "note": "arcminutes"}
|
|
133
|
+
{"id": "int-004", "category": "intervals_sets", "reference": "[0, 1]", "answer": "0 \\le x \\le 1", "equivalent": true, "note": "closed interval vs inequality"}
|
|
134
|
+
{"id": "int-005", "category": "intervals_sets", "reference": "(0, \\infty)", "answer": "x > 0", "equivalent": true, "note": "unbounded interval vs inequality"}
|
|
135
|
+
{"id": "int-006", "category": "intervals_sets", "reference": "(-\\infty, 2)", "answer": "x < 2", "equivalent": true, "note": "left-unbounded interval vs inequality"}
|
|
136
|
+
{"id": "int-007", "category": "intervals_sets", "reference": "(-\\infty, 2)", "answer": "x \\le 2", "equivalent": false, "note": "strict vs non-strict inequality"}
|
|
137
|
+
{"id": "int-008", "category": "intervals_sets", "reference": "[1, 3)", "answer": "[1, 3]", "equivalent": false, "note": "half-open vs closed"}
|
|
138
|
+
{"id": "int-009", "category": "intervals_sets", "reference": "(1, 3)", "answer": "]1, 3[", "equivalent": true, "note": "reversed-bracket (French) interval notation"}
|
|
139
|
+
{"id": "int-010", "category": "intervals_sets", "reference": "(-\\infty, \\infty)", "answer": "\\mathbb{R}", "equivalent": true, "note": "whole real line vs R"}
|
|
140
|
+
{"id": "int-011", "category": "intervals_sets", "reference": "(-\\infty, \\infty)", "answer": "\\text{all real numbers}", "equivalent": true, "note": "real line in words"}
|
|
141
|
+
{"id": "int-012", "category": "intervals_sets", "reference": "\\emptyset", "answer": "\\varnothing", "equivalent": true, "note": "two empty-set symbols"}
|
|
142
|
+
{"id": "int-013", "category": "intervals_sets", "reference": "\\emptyset", "answer": "\\{\\}", "equivalent": true, "note": "empty braces"}
|
|
143
|
+
{"id": "int-014", "category": "intervals_sets", "reference": "\\emptyset", "answer": "\\{0\\}", "equivalent": false, "note": "empty set vs set containing zero"}
|
|
144
|
+
{"id": "int-015", "category": "intervals_sets", "reference": "(-\\infty, -1) \\cup (1, \\infty)", "answer": "|x| > 1", "equivalent": true, "note": "union vs absolute-value inequality"}
|
|
145
|
+
{"id": "int-016", "category": "intervals_sets", "reference": "(-\\infty, -1) \\cup (1, \\infty)", "answer": "(1, \\infty) \\cup (-\\infty, -1)", "equivalent": true, "note": "union written in the other order"}
|
|
146
|
+
{"id": "int-017", "category": "intervals_sets", "reference": "(-\\infty, -1) \\cup (1, \\infty)", "answer": "(-1, 1)", "equivalent": false, "note": "complement instead of the set"}
|
|
147
|
+
{"id": "int-018", "category": "intervals_sets", "reference": "[-1, 1]", "answer": "|x| \\le 1", "equivalent": true, "note": "closed interval vs absolute-value inequality"}
|
|
148
|
+
{"id": "int-019", "category": "intervals_sets", "reference": "\\{1, 2\\}", "answer": "\\{1, 2, 2\\}", "equivalent": true, "note": "repeated element in a set"}
|
|
149
|
+
{"id": "int-020", "category": "intervals_sets", "reference": "\\{1, 2\\}", "answer": "\\{1, 2, 3\\}", "equivalent": false, "note": "extra element"}
|
|
150
|
+
{"id": "int-021", "category": "intervals_sets", "reference": "\\{1, 2, 3\\}", "answer": "\\{x \\in \\mathbb{Z} : 1 \\le x \\le 3\\}", "equivalent": true, "note": "set-builder notation"}
|
|
151
|
+
{"id": "int-022", "category": "intervals_sets", "reference": "(0, 1]", "answer": "x \\in (0, 1]", "equivalent": true, "note": "membership statement"}
|
|
152
|
+
{"id": "int-023", "category": "intervals_sets", "reference": "[0, 1)", "answer": "\\{x \\mid 0 \\le x < 1\\}", "equivalent": true, "note": "set-builder notation for an interval"}
|
|
153
|
+
{"id": "comb-004", "category": "combinatorics", "reference": "\\binom{6}{3}", "answer": "20", "equivalent": true, "note": "binomial coefficient evaluated"}
|
|
154
|
+
{"id": "comb-005", "category": "combinatorics", "reference": "\\binom{6}{3}", "answer": "C(6,3)", "equivalent": true, "note": "C(n,k) notation"}
|
|
155
|
+
{"id": "comb-006", "category": "combinatorics", "reference": "\\binom{6}{3}", "answer": "{}^{6}C_{3}", "equivalent": true, "note": "nCr notation with super/subscripts"}
|
|
156
|
+
{"id": "comb-007", "category": "combinatorics", "reference": "\\binom{6}{3}", "answer": "\\binom{6}{2}", "equivalent": false, "note": "different lower index"}
|
|
157
|
+
{"id": "comb-008", "category": "combinatorics", "reference": "\\binom{6}{2}", "answer": "\\binom{6}{4}", "equivalent": true, "note": "symmetry of binomial coefficients"}
|
|
158
|
+
{"id": "comb-009", "category": "combinatorics", "reference": "P(5,2)", "answer": "20", "equivalent": true, "note": "permutation count evaluated"}
|
|
159
|
+
{"id": "comb-010", "category": "combinatorics", "reference": "\\frac{5!}{3!}", "answer": "20", "equivalent": true, "note": "factorial ratio evaluated"}
|
|
160
|
+
{"id": "comb-011", "category": "combinatorics", "reference": "5!", "answer": "25", "equivalent": false, "note": "factorial confused with square"}
|
|
161
|
+
{"id": "comb-012", "category": "combinatorics", "reference": "0!", "answer": "1", "equivalent": true, "note": "zero factorial"}
|
|
162
|
+
{"id": "comb-013", "category": "combinatorics", "reference": "3!", "answer": "3", "equivalent": false, "note": "factorial sign ignored"}
|
|
163
|
+
{"id": "comb-014", "category": "combinatorics", "reference": "\\binom{n}{1}", "answer": "n", "equivalent": true, "note": "symbolic binomial with k = 1"}
|
|
164
|
+
{"id": "comb-015", "category": "combinatorics", "reference": "\\binom{n}{2}", "answer": "\\frac{n^2-n}{2}", "equivalent": true, "note": "expanded formula"}
|
|
165
|
+
{"id": "comb-016", "category": "combinatorics", "reference": "\\binom{n}{2}", "answer": "n(n-1)", "equivalent": false, "note": "missing division by 2"}
|
|
166
|
+
{"id": "comb-017", "category": "combinatorics", "reference": "\\binom{10}{5}", "answer": "252", "equivalent": true, "note": "central binomial coefficient"}
|
|
167
|
+
{"id": "comb-018", "category": "combinatorics", "reference": "\\binom{10}{5}", "answer": "250", "equivalent": false, "note": "close but wrong value"}
|
|
168
|
+
{"id": "comb-019", "category": "combinatorics", "reference": "\\frac{1}{\\binom{4}{2}}", "answer": "\\frac{1}{6}", "equivalent": true, "note": "probability with a binomial denominator"}
|
|
169
|
+
{"id": "comb-020", "category": "combinatorics", "reference": "n!", "answer": "\\Gamma(n+1)", "equivalent": true, "note": "gamma function form"}
|
|
170
|
+
{"id": "big-004", "category": "large_numbers", "reference": "1000000", "answer": "10^6", "equivalent": true, "note": "power of ten"}
|
|
171
|
+
{"id": "big-005", "category": "large_numbers", "reference": "1000000", "answer": "1 \\times 10^{6}", "equivalent": true, "note": "scientific notation"}
|
|
172
|
+
{"id": "big-006", "category": "large_numbers", "reference": "1000000", "answer": "1e6", "equivalent": true, "note": "programming-style scientific notation"}
|
|
173
|
+
{"id": "big-007", "category": "large_numbers", "reference": "1000000", "answer": "1 million", "equivalent": true, "note": "number in words"}
|
|
174
|
+
{"id": "big-008", "category": "large_numbers", "reference": "1000000", "answer": "1000001", "equivalent": false, "note": "off by one near a million"}
|
|
175
|
+
{"id": "big-009", "category": "large_numbers", "reference": "10000", "answer": "10001", "equivalent": false, "note": "off by one at 10^4, where relative tolerance starts to hide errors"}
|
|
176
|
+
{"id": "big-010", "category": "large_numbers", "reference": "99999", "answer": "100000", "equivalent": false, "note": "off by one across a digit boundary"}
|
|
177
|
+
{"id": "big-011", "category": "large_numbers", "reference": "1234567890", "answer": "1234567891", "equivalent": false, "note": "off by one at ten digits"}
|
|
178
|
+
{"id": "big-012", "category": "large_numbers", "reference": "2^{64}", "answer": "18446744073709551616", "equivalent": true, "note": "exact big integer"}
|
|
179
|
+
{"id": "big-013", "category": "large_numbers", "reference": "2^{64}", "answer": "18446744073709551615", "equivalent": false, "note": "2^64 - 1, a common confusion"}
|
|
180
|
+
{"id": "big-014", "category": "large_numbers", "reference": "10^{100}", "answer": "1e100", "equivalent": true, "note": "googol in e-notation"}
|
|
181
|
+
{"id": "big-015", "category": "large_numbers", "reference": "10^{100}", "answer": "10^{99}", "equivalent": false, "note": "exponent off by one"}
|
|
182
|
+
{"id": "big-016", "category": "large_numbers", "reference": "123456789", "answer": "1.23456789 \\times 10^{8}", "equivalent": true, "note": "exact scientific notation"}
|
|
183
|
+
{"id": "big-017", "category": "large_numbers", "reference": "123456789", "answer": "1.23 \\times 10^{8}", "equivalent": false, "note": "rounded scientific notation"}
|
|
184
|
+
{"id": "big-018", "category": "large_numbers", "reference": "6.02 \\times 10^{23}", "answer": "6.02e23", "equivalent": true, "note": "LaTeX vs e-notation"}
|
|
185
|
+
{"id": "big-019", "category": "large_numbers", "reference": "6.02 \\times 10^{23}", "answer": "6.02 \\times 10^{22}", "equivalent": false, "note": "exponent off by one"}
|
|
186
|
+
{"id": "big-020", "category": "large_numbers", "reference": "3^{20}", "answer": "3486784401", "equivalent": true, "note": "power evaluated"}
|
|
187
|
+
{"id": "big-021", "category": "large_numbers", "reference": "500000", "answer": "500 thousand", "equivalent": true, "note": "number partly in words"}
|
|
188
|
+
{"id": "big-022", "category": "large_numbers", "reference": "2024", "answer": "2025", "equivalent": false, "note": "off by one (year-style number)"}
|
|
189
|
+
{"id": "multi-004", "category": "multiple_answers", "reference": "1, 2, 3", "answer": "3, 2, 1", "equivalent": true, "note": "solutions in reverse order"}
|
|
190
|
+
{"id": "multi-005", "category": "multiple_answers", "reference": "1, 2, 3", "answer": "1, 2", "equivalent": false, "note": "missing a solution"}
|
|
191
|
+
{"id": "multi-006", "category": "multiple_answers", "reference": "1, 2", "answer": "1, 2, 3", "equivalent": false, "note": "extra solution"}
|
|
192
|
+
{"id": "multi-007", "category": "multiple_answers", "reference": "x = 1, x = 2", "answer": "x \\in \\{1, 2\\}", "equivalent": true, "note": "solutions as set membership"}
|
|
193
|
+
{"id": "multi-008", "category": "multiple_answers", "reference": "x = 1, x = 2", "answer": "1 \\text{ and } 2", "equivalent": true, "note": "solutions joined with 'and'"}
|
|
194
|
+
{"id": "multi-009", "category": "multiple_answers", "reference": "x = 1, x = 2", "answer": "1 \\text{ or } 2", "equivalent": true, "note": "solutions joined with 'or'"}
|
|
195
|
+
{"id": "multi-010", "category": "multiple_answers", "reference": "\\pm 3", "answer": "3, -3", "equivalent": true, "note": "plus-minus expanded"}
|
|
196
|
+
{"id": "multi-011", "category": "multiple_answers", "reference": "\\pm 3", "answer": "3", "equivalent": false, "note": "plus-minus reduced to one value"}
|
|
197
|
+
{"id": "multi-012", "category": "multiple_answers", "reference": "2 \\pm \\sqrt{3}", "answer": "2+\\sqrt{3}, 2-\\sqrt{3}", "equivalent": true, "note": "plus-minus with a radical expanded"}
|
|
198
|
+
{"id": "multi-013", "category": "multiple_answers", "reference": "(1, 2)", "answer": "(2, 1)", "equivalent": false, "note": "ordered pair: order matters"}
|
|
199
|
+
{"id": "multi-014", "category": "multiple_answers", "reference": "(1, 2)", "answer": "x = 1, y = 2", "equivalent": true, "note": "ordered pair vs variable assignment"}
|
|
200
|
+
{"id": "multi-015", "category": "multiple_answers", "reference": "(1, 2)", "answer": "x = 2, y = 1", "equivalent": false, "note": "variable assignment with values swapped"}
|
|
201
|
+
{"id": "multi-016", "category": "multiple_answers", "reference": "(1, 2), (3, 4)", "answer": "(3, 4), (1, 2)", "equivalent": true, "note": "list of points in another order"}
|
|
202
|
+
{"id": "multi-017", "category": "multiple_answers", "reference": "x = 1", "answer": "1", "equivalent": true, "note": "variable name dropped"}
|
|
203
|
+
{"id": "expr-001", "category": "expressions", "reference": "2x+2", "answer": "2(x+1)", "equivalent": true, "note": "factored out a common factor"}
|
|
204
|
+
{"id": "expr-002", "category": "expressions", "reference": "x^2-1", "answer": "(x-1)(x+1)", "equivalent": true, "note": "difference of squares"}
|
|
205
|
+
{"id": "expr-003", "category": "expressions", "reference": "x^2-1", "answer": "(x-1)^2", "equivalent": false, "note": "difference of squares confused with a square"}
|
|
206
|
+
{"id": "expr-004", "category": "expressions", "reference": "\\frac{1}{x}+\\frac{1}{y}", "answer": "\\frac{x+y}{xy}", "equivalent": true, "note": "fractions added correctly"}
|
|
207
|
+
{"id": "expr-005", "category": "expressions", "reference": "\\frac{1}{x}+\\frac{1}{y}", "answer": "\\frac{2}{x+y}", "equivalent": false, "note": "common fraction-addition mistake"}
|
|
208
|
+
{"id": "expr-006", "category": "expressions", "reference": "(a+b)^2", "answer": "a^2+b^2", "equivalent": false, "note": "missing cross term"}
|
|
209
|
+
{"id": "expr-007", "category": "expressions", "reference": "(a+b)^2", "answer": "a^2+2ab+b^2", "equivalent": true, "note": "square expanded"}
|
|
210
|
+
{"id": "expr-008", "category": "expressions", "reference": "\\sin^2 x + \\cos^2 x", "answer": "1", "equivalent": true, "note": "Pythagorean identity"}
|
|
211
|
+
{"id": "expr-009", "category": "expressions", "reference": "\\sin 2x", "answer": "2\\sin x \\cos x", "equivalent": true, "note": "double-angle identity"}
|
|
212
|
+
{"id": "expr-010", "category": "expressions", "reference": "\\sin 2x", "answer": "2\\sin x", "equivalent": false, "note": "factor pulled out of sine"}
|
|
213
|
+
{"id": "expr-011", "category": "expressions", "reference": "\\cos 2x", "answer": "1-2\\sin^2 x", "equivalent": true, "note": "double-angle identity for cosine"}
|
|
214
|
+
{"id": "expr-012", "category": "expressions", "reference": "e^{a+b}", "answer": "e^a e^b", "equivalent": true, "note": "exponent rule"}
|
|
215
|
+
{"id": "expr-013", "category": "expressions", "reference": "\\ln(ab)", "answer": "\\ln a + \\ln b", "equivalent": true, "note": "log of a product (a, b > 0)"}
|
|
216
|
+
{"id": "expr-014", "category": "expressions", "reference": "\\ln(a+b)", "answer": "\\ln a + \\ln b", "equivalent": false, "note": "log of a sum is not a sum of logs"}
|
|
217
|
+
{"id": "expr-015", "category": "expressions", "reference": "\\sqrt{x^2}", "answer": "x", "equivalent": false, "note": "should be |x| for real x"}
|
|
218
|
+
{"id": "expr-016", "category": "expressions", "reference": "\\sqrt{x^2}", "answer": "|x|", "equivalent": true, "note": "absolute value"}
|
|
219
|
+
{"id": "expr-017", "category": "expressions", "reference": "x^{-1}", "answer": "\\frac{1}{x}", "equivalent": true, "note": "negative exponent"}
|
|
220
|
+
{"id": "expr-018", "category": "expressions", "reference": "x^{1/3}", "answer": "\\sqrt[3]{x}", "equivalent": true, "note": "fractional exponent vs cube root"}
|
|
221
|
+
{"id": "expr-019", "category": "expressions", "reference": "2^{x+1}", "answer": "2 \\cdot 2^x", "equivalent": true, "note": "exponent rule"}
|
|
222
|
+
{"id": "expr-020", "category": "expressions", "reference": "2^{x+1}", "answer": "2^x + 1", "equivalent": false, "note": "exponent rule misapplied"}
|
|
223
|
+
{"id": "expr-021", "category": "expressions", "reference": "3x", "answer": "x \\cdot 3", "equivalent": true, "note": "commuted product"}
|
|
224
|
+
{"id": "expr-022", "category": "expressions", "reference": "3x", "answer": "3 \\times x", "equivalent": true, "note": "explicit multiplication sign"}
|
|
225
|
+
{"id": "expr-023", "category": "expressions", "reference": "\\frac{x}{2}", "answer": "0.5x", "equivalent": true, "note": "fraction vs decimal coefficient"}
|
|
226
|
+
{"id": "expr-024", "category": "expressions", "reference": "x^2 + C", "answer": "x^2", "equivalent": false, "note": "missing constant of integration when the reference has one"}
|
|
227
|
+
{"id": "expr-025", "category": "expressions", "reference": "x^2 + C", "answer": "x^2 + K", "equivalent": true, "note": "different name for the constant"}
|
|
228
|
+
{"id": "eq-001", "category": "equations_relations", "reference": "y = 2x + 1", "answer": "2x + 1", "equivalent": true, "note": "'y =' dropped"}
|
|
229
|
+
{"id": "eq-002", "category": "equations_relations", "reference": "y = 2x + 1", "answer": "y - 2x = 1", "equivalent": true, "note": "rearranged equation"}
|
|
230
|
+
{"id": "eq-003", "category": "equations_relations", "reference": "y = 2x + 1", "answer": "2x - y + 1 = 0", "equivalent": true, "note": "general form"}
|
|
231
|
+
{"id": "eq-004", "category": "equations_relations", "reference": "y = 2x + 1", "answer": "y = 2x - 1", "equivalent": false, "note": "wrong intercept"}
|
|
232
|
+
{"id": "eq-005", "category": "equations_relations", "reference": "x > 3", "answer": "3 < x", "equivalent": true, "note": "inequality written the other way round"}
|
|
233
|
+
{"id": "eq-006", "category": "equations_relations", "reference": "x > 3", "answer": "x \\ge 3", "equivalent": false, "note": "strict vs non-strict"}
|
|
234
|
+
{"id": "eq-007", "category": "equations_relations", "reference": "x \\ge 3", "answer": "x \\geq 3", "equivalent": true, "note": "\\ge vs \\geq"}
|
|
235
|
+
{"id": "eq-008", "category": "equations_relations", "reference": "x \\le 3", "answer": "x \\leqslant 3", "equivalent": true, "note": "\\leqslant"}
|
|
236
|
+
{"id": "eq-009", "category": "equations_relations", "reference": "x \\le 3", "answer": "x ≤ 3", "equivalent": true, "note": "Unicode less-than-or-equal"}
|
|
237
|
+
{"id": "eq-010", "category": "equations_relations", "reference": "x \\neq 0", "answer": "x \\ne 0", "equivalent": true, "note": "\\neq vs \\ne"}
|
|
238
|
+
{"id": "eq-011", "category": "equations_relations", "reference": "x^2 + y^2 = 1", "answer": "y^2 + x^2 = 1", "equivalent": true, "note": "terms reordered"}
|
|
239
|
+
{"id": "eq-012", "category": "equations_relations", "reference": "x^2 + y^2 = 1", "answer": "x^2 + y^2 = 2", "equivalent": false, "note": "different radius"}
|
|
240
|
+
{"id": "eq-013", "category": "equations_relations", "reference": "x^2 + y^2 = 1", "answer": "2x^2 + 2y^2 = 2", "equivalent": true, "note": "both sides scaled"}
|
|
241
|
+
{"id": "eq-014", "category": "equations_relations", "reference": "-x > 3", "answer": "x < -3", "equivalent": true, "note": "inequality flipped correctly"}
|
|
242
|
+
{"id": "eq-015", "category": "equations_relations", "reference": "-x > 3", "answer": "x > -3", "equivalent": false, "note": "forgot to flip the inequality"}
|
|
243
|
+
{"id": "eq-016", "category": "equations_relations", "reference": "x = 5", "answer": "5 = x", "equivalent": true, "note": "sides swapped"}
|
|
244
|
+
{"id": "eq-017", "category": "equations_relations", "reference": "f(x) = x^2", "answer": "x^2", "equivalent": true, "note": "'f(x) =' dropped"}
|
|
245
|
+
{"id": "eq-018", "category": "equations_relations", "reference": "y = x^2", "answer": "f(x) = x^2", "equivalent": true, "note": "y vs f(x)"}
|
|
246
|
+
{"id": "cplx-001", "category": "complex_numbers", "reference": "i", "answer": "\\sqrt{-1}", "equivalent": true, "note": "imaginary unit as a root"}
|
|
247
|
+
{"id": "cplx-002", "category": "complex_numbers", "reference": "1+i", "answer": "i+1", "equivalent": true, "note": "terms reordered"}
|
|
248
|
+
{"id": "cplx-003", "category": "complex_numbers", "reference": "1+i", "answer": "1-i", "equivalent": false, "note": "complex conjugate"}
|
|
249
|
+
{"id": "cplx-004", "category": "complex_numbers", "reference": "2i", "answer": "2 i", "equivalent": true, "note": "space before i"}
|
|
250
|
+
{"id": "cplx-005", "category": "complex_numbers", "reference": "2i", "answer": "2j", "equivalent": true, "note": "engineering j for the imaginary unit"}
|
|
251
|
+
{"id": "cplx-006", "category": "complex_numbers", "reference": "i^2", "answer": "-1", "equivalent": true, "note": "i squared"}
|
|
252
|
+
{"id": "cplx-007", "category": "complex_numbers", "reference": "\\frac{1}{i}", "answer": "-i", "equivalent": true, "note": "reciprocal of i"}
|
|
253
|
+
{"id": "cplx-008", "category": "complex_numbers", "reference": "\\frac{1}{i}", "answer": "i", "equivalent": false, "note": "sign error in reciprocal of i"}
|
|
254
|
+
{"id": "cplx-009", "category": "complex_numbers", "reference": "e^{i\\pi}", "answer": "-1", "equivalent": true, "note": "Euler's identity"}
|
|
255
|
+
{"id": "cplx-010", "category": "complex_numbers", "reference": "\\sqrt{2} e^{i\\pi/4}", "answer": "1+i", "equivalent": true, "note": "polar vs rectangular form"}
|
|
256
|
+
{"id": "cplx-011", "category": "complex_numbers", "reference": "1+i", "answer": "\\sqrt{2}\\left(\\cos\\frac{\\pi}{4} + i\\sin\\frac{\\pi}{4}\\right)", "equivalent": true, "note": "trigonometric form"}
|
|
257
|
+
{"id": "cplx-012", "category": "complex_numbers", "reference": "|3+4i|", "answer": "5", "equivalent": true, "note": "modulus evaluated"}
|
|
258
|
+
{"id": "cplx-013", "category": "complex_numbers", "reference": "3+4i", "answer": "5", "equivalent": false, "note": "modulus is not the number"}
|
|
259
|
+
{"id": "cplx-014", "category": "complex_numbers", "reference": "(1+i)^2", "answer": "2i", "equivalent": true, "note": "square evaluated"}
|
|
260
|
+
{"id": "cplx-015", "category": "complex_numbers", "reference": "2+3i", "answer": "2+3\\mathrm{i}", "equivalent": true, "note": "upright i"}
|
|
261
|
+
{"id": "mat-001", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 1 & 2 \\\\ 3 & 4 \\end{pmatrix}", "answer": "\\begin{bmatrix} 1 & 2 \\\\ 3 & 4 \\end{bmatrix}", "equivalent": true, "note": "pmatrix vs bmatrix"}
|
|
262
|
+
{"id": "mat-002", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 1 & 2 \\\\ 3 & 4 \\end{pmatrix}", "answer": "\\begin{pmatrix} 1 & 3 \\\\ 2 & 4 \\end{pmatrix}", "equivalent": false, "note": "transpose"}
|
|
263
|
+
{"id": "mat-003", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 1 \\\\ 2 \\end{pmatrix}", "answer": "(1, 2)", "equivalent": true, "note": "column vector vs tuple"}
|
|
264
|
+
{"id": "mat-004", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 1 \\\\ 2 \\end{pmatrix}", "answer": "\\langle 1, 2 \\rangle", "equivalent": true, "note": "angle-bracket vector"}
|
|
265
|
+
{"id": "mat-005", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 1 \\\\ 2 \\end{pmatrix}", "answer": "\\begin{pmatrix} 2 \\\\ 1 \\end{pmatrix}", "equivalent": false, "note": "components swapped"}
|
|
266
|
+
{"id": "mat-006", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 0.5 & 1 \\end{pmatrix}", "answer": "\\begin{pmatrix} \\frac{1}{2} & 1 \\end{pmatrix}", "equivalent": true, "note": "entries in different forms"}
|
|
267
|
+
{"id": "mat-007", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 1 & 0 \\\\ 0 & 1 \\end{pmatrix}", "answer": "I_2", "equivalent": true, "note": "identity matrix symbol with size"}
|
|
268
|
+
{"id": "mat-008", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 1 & 0 \\\\ 0 & 1 \\end{pmatrix}", "answer": "I", "equivalent": true, "note": "identity matrix symbol"}
|
|
269
|
+
{"id": "mat-009", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 2 & 0 \\\\ 0 & 2 \\end{pmatrix}", "answer": "2I", "equivalent": true, "note": "scalar times identity"}
|
|
270
|
+
{"id": "mat-010", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 2 & 0 \\\\ 0 & 2 \\end{pmatrix}", "answer": "2", "equivalent": false, "note": "a scalar is not a matrix"}
|
|
271
|
+
{"id": "mat-011", "category": "matrices_vectors", "reference": "2\\mathbf{i} + 3\\mathbf{j}", "answer": "\\langle 2, 3 \\rangle", "equivalent": true, "note": "unit-vector notation"}
|
|
272
|
+
{"id": "mat-012", "category": "matrices_vectors", "reference": "\\begin{vmatrix} 1 & 2 \\\\ 3 & 4 \\end{vmatrix}", "answer": "-2", "equivalent": true, "note": "determinant evaluated"}
|
|
273
|
+
{"id": "mat-013", "category": "matrices_vectors", "reference": "\\begin{pmatrix} 1 & 2 \\\\ 3 & 4 \\end{pmatrix}", "answer": "\\begin{pmatrix} 1 & 2 & 3 & 4 \\end{pmatrix}", "equivalent": false, "note": "wrong shape"}
|
|
274
|
+
{"id": "text-001", "category": "text_answers", "reference": "C", "answer": "\\text{C}", "equivalent": true, "note": "letter in \\text"}
|
|
275
|
+
{"id": "text-002", "category": "text_answers", "reference": "C", "answer": "(C)", "equivalent": true, "note": "letter in parentheses"}
|
|
276
|
+
{"id": "text-003", "category": "text_answers", "reference": "C", "answer": "C)", "equivalent": true, "note": "letter with closing parenthesis"}
|
|
277
|
+
{"id": "text-004", "category": "text_answers", "reference": "C", "answer": "Option C", "equivalent": true, "note": "letter with a label"}
|
|
278
|
+
{"id": "text-005", "category": "text_answers", "reference": "C", "answer": "D", "equivalent": false, "note": "wrong choice"}
|
|
279
|
+
{"id": "text-006", "category": "text_answers", "reference": "C", "answer": "c", "equivalent": true, "note": "lowercase choice letter"}
|
|
280
|
+
{"id": "text-007", "category": "text_answers", "reference": "B", "answer": "\\boxed{B}", "equivalent": true, "note": "boxed choice letter"}
|
|
281
|
+
{"id": "text-008", "category": "text_answers", "reference": "\\text{Yes}", "answer": "yes", "equivalent": true, "note": "case difference"}
|
|
282
|
+
{"id": "text-009", "category": "text_answers", "reference": "\\text{Yes}", "answer": "No", "equivalent": false, "note": "opposite answer"}
|
|
283
|
+
{"id": "text-010", "category": "text_answers", "reference": "\\text{even}", "answer": "\\text{Even}", "equivalent": true, "note": "capitalized word"}
|
|
284
|
+
{"id": "text-011", "category": "text_answers", "reference": "\\text{odd}", "answer": "\\text{even}", "equivalent": false, "note": "opposite word"}
|
|
285
|
+
{"id": "text-012", "category": "text_answers", "reference": "\\text{no solution}", "answer": "\\emptyset", "equivalent": true, "note": "no solution as the empty set"}
|
|
286
|
+
{"id": "text-013", "category": "text_answers", "reference": "\\text{undefined}", "answer": "\\text{does not exist}", "equivalent": true, "note": "synonymous phrases"}
|
|
287
|
+
{"id": "text-014", "category": "text_answers", "reference": "\\infty", "answer": "\\text{infinity}", "equivalent": true, "note": "infinity in words"}
|
|
288
|
+
{"id": "text-015", "category": "text_answers", "reference": "\\infty", "answer": "-\\infty", "equivalent": false, "note": "opposite infinity"}
|
|
289
|
+
{"id": "const-001", "category": "constants_irrational", "reference": "\\pi", "answer": "3.14", "equivalent": false, "note": "two-decimal approximation of pi"}
|
|
290
|
+
{"id": "const-002", "category": "constants_irrational", "reference": "\\pi", "answer": "3.14159", "equivalent": false, "note": "five-decimal approximation of pi"}
|
|
291
|
+
{"id": "const-003", "category": "constants_irrational", "reference": "2\\pi", "answer": "\\pi \\cdot 2", "equivalent": true, "note": "commuted product"}
|
|
292
|
+
{"id": "const-004", "category": "constants_irrational", "reference": "e", "answer": "\\exp(1)", "equivalent": true, "note": "e as exp(1)"}
|
|
293
|
+
{"id": "const-005", "category": "constants_irrational", "reference": "e", "answer": "2.718", "equivalent": false, "note": "approximation of e"}
|
|
294
|
+
{"id": "const-006", "category": "constants_irrational", "reference": "e", "answer": "\\mathrm{e}", "equivalent": true, "note": "upright e"}
|
|
295
|
+
{"id": "const-007", "category": "constants_irrational", "reference": "\\sqrt{2}", "answer": "2^{0.5}", "equivalent": true, "note": "decimal exponent"}
|
|
296
|
+
{"id": "const-008", "category": "constants_irrational", "reference": "\\frac{1+\\sqrt{5}}{2}", "answer": "\\frac{\\sqrt{5}+1}{2}", "equivalent": true, "note": "terms reordered in the numerator"}
|
|
297
|
+
{"id": "const-009", "category": "constants_irrational", "reference": "\\frac{1+\\sqrt{5}}{2}", "answer": "\\frac{1-\\sqrt{5}}{2}", "equivalent": false, "note": "the other root of x^2 = x + 1"}
|
|
298
|
+
{"id": "const-010", "category": "constants_irrational", "reference": "\\pi^2", "answer": "\\pi \\cdot \\pi", "equivalent": true, "note": "square written as a product"}
|
|
299
|
+
{"id": "const-011", "category": "constants_irrational", "reference": "\\frac{\\pi}{2}", "answer": "\\frac{1}{2}\\pi", "equivalent": true, "note": "coefficient outside"}
|
|
300
|
+
{"id": "const-012", "category": "constants_irrational", "reference": "\\frac{\\pi}{2}", "answer": "\\pi/2", "equivalent": true, "note": "slash fraction"}
|
|
301
|
+
{"id": "const-013", "category": "constants_irrational", "reference": "\\frac{\\pi}{2}", "answer": "1.5708", "equivalent": false, "note": "decimal approximation"}
|
|
302
|
+
{"id": "const-014", "category": "constants_irrational", "reference": "\\ln 2", "answer": "0.693", "equivalent": false, "note": "decimal approximation of a logarithm"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""Run a checker over the suite and summarize the results by category."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections import defaultdict
|
|
6
|
+
from dataclasses import dataclass, field
|
|
7
|
+
from typing import Dict, List, Optional
|
|
8
|
+
|
|
9
|
+
from .cases import Case, load_cases
|
|
10
|
+
from .checkers import Checker
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass
|
|
14
|
+
class Result:
|
|
15
|
+
case: Case
|
|
16
|
+
verdict: Optional[bool] # None means the checker crashed
|
|
17
|
+
error: Optional[str] = None
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def correct(self) -> bool:
|
|
21
|
+
return self.verdict is not None and self.verdict == self.case.equivalent
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@dataclass
|
|
25
|
+
class Scorecard:
|
|
26
|
+
checker: str
|
|
27
|
+
results: List[Result] = field(default_factory=list)
|
|
28
|
+
|
|
29
|
+
@property
|
|
30
|
+
def accuracy(self) -> float:
|
|
31
|
+
return sum(r.correct for r in self.results) / len(self.results) if self.results else 0.0
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def errors(self) -> List[Result]:
|
|
35
|
+
return [r for r in self.results if r.verdict is None]
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def failures(self) -> List[Result]:
|
|
39
|
+
"""Cases the checker answered, but answered wrong (crashes are listed separately)."""
|
|
40
|
+
return [r for r in self.results if r.verdict is not None and not r.correct]
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def false_accepts(self) -> List[Result]:
|
|
44
|
+
"""Said "equivalent" when the answer is wrong. The worse error for RL rewards."""
|
|
45
|
+
return [r for r in self.failures if r.verdict]
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def false_rejects(self) -> List[Result]:
|
|
49
|
+
"""Said "not equivalent" to a correct answer, which deflates benchmark scores."""
|
|
50
|
+
return [r for r in self.failures if not r.verdict]
|
|
51
|
+
|
|
52
|
+
def by_category(self) -> Dict[str, Dict[str, int]]:
|
|
53
|
+
table: Dict[str, Dict[str, int]] = defaultdict(lambda: {"total": 0, "correct": 0, "errors": 0})
|
|
54
|
+
for r in self.results:
|
|
55
|
+
row = table[r.case.category]
|
|
56
|
+
row["total"] += 1
|
|
57
|
+
row["correct"] += r.correct
|
|
58
|
+
row["errors"] += r.verdict is None
|
|
59
|
+
return dict(sorted(table.items()))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def run(checker: Checker, name: str = "custom", cases: Optional[List[Case]] = None) -> Scorecard:
|
|
63
|
+
"""Run `checker` on every case. A crash is recorded as an error, never as a verdict."""
|
|
64
|
+
card = Scorecard(checker=name)
|
|
65
|
+
for case in cases if cases is not None else load_cases():
|
|
66
|
+
try:
|
|
67
|
+
verdict = bool(checker(case.reference, case.answer))
|
|
68
|
+
card.results.append(Result(case, verdict))
|
|
69
|
+
except Exception as exc: # noqa: BLE001 - any crash is data for the scorecard
|
|
70
|
+
first_line = str(exc).strip().splitlines()[0] if str(exc).strip() else ""
|
|
71
|
+
card.results.append(Result(case, None, f"{type(exc).__name__}: {first_line}"[:200]))
|
|
72
|
+
return card
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: mathcheck-bench
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A labeled test suite and scorecard for math answer checkers used in LLM evaluation.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Harish-Mathematican/mathcheck-bench
|
|
6
|
+
Project-URL: Issues, https://github.com/Harish-Mathematican/mathcheck-bench/issues
|
|
7
|
+
Author: Harish
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: benchmark,evaluation,latex,llm,math,verifier
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Provides-Extra: all
|
|
18
|
+
Requires-Dist: lark>=1.1; extra == 'all'
|
|
19
|
+
Requires-Dist: math-verify>=0.9; extra == 'all'
|
|
20
|
+
Requires-Dist: sympy>=1.13; extra == 'all'
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: lark>=1.1; extra == 'dev'
|
|
23
|
+
Requires-Dist: math-verify>=0.9; extra == 'dev'
|
|
24
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
25
|
+
Requires-Dist: sympy>=1.13; extra == 'dev'
|
|
26
|
+
Provides-Extra: math-verify
|
|
27
|
+
Requires-Dist: math-verify>=0.9; extra == 'math-verify'
|
|
28
|
+
Provides-Extra: sympy
|
|
29
|
+
Requires-Dist: lark>=1.1; extra == 'sympy'
|
|
30
|
+
Requires-Dist: sympy>=1.13; extra == 'sympy'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# mathcheck-bench
|
|
34
|
+
|
|
35
|
+
**How often does your math answer checker get it wrong?**
|
|
36
|
+
|
|
37
|
+
When we evaluate or train LLMs on math, a *checker* decides whether the model's answer
|
|
38
|
+
matches the reference (`1/2` vs `0.5`, `\binom{5}{2}` vs `10`, `(0,1]` vs `0 < x \le 1`).
|
|
39
|
+
Benchmark scores are only as good as that checker, and studies show checkers wrongly reject
|
|
40
|
+
about 14% of correct answers ([Huang et al.](https://arxiv.org/abs/2505.22203)) and disagree
|
|
41
|
+
with each other by up to 41 points on identical inputs ([verifier audit](https://arxiv.org/abs/2609.01354)).
|
|
42
|
+
|
|
43
|
+
`mathcheck-bench` is a small, hand-labeled suite of tricky answer pairs plus a one-command
|
|
44
|
+
scorecard, so you can see **where** a checker fails before you trust its numbers.
|
|
45
|
+
|
|
46
|
+
> Status: v0.1. Contributions of new cases are very welcome.
|
|
47
|
+
|
|
48
|
+
## Quick start
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install "mathcheck-bench[all]"
|
|
52
|
+
mathcheck-bench run --checker all
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
== math-verify ==
|
|
57
|
+
category correct errors
|
|
58
|
+
angles 7/18 0
|
|
59
|
+
units 11/26 0
|
|
60
|
+
...
|
|
61
|
+
overall 74.2% 0
|
|
62
|
+
false accepts: 8 false rejects: 70
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Add `--failures` to list every case a checker got wrong.
|
|
66
|
+
|
|
67
|
+
## Current scorecard (302 cases, 15 categories)
|
|
68
|
+
|
|
69
|
+
| Category | Cases | string-normalize | sympy-basic | math-verify |
|
|
70
|
+
|---|---:|---:|---:|---:|
|
|
71
|
+
| angles | 18 | 22% | 0% | 39% |
|
|
72
|
+
| combinatorics | 20 | 25% | 70% | 85% |
|
|
73
|
+
| complex_numbers | 15 | 27% | 33% | 33% |
|
|
74
|
+
| constants_irrational | 14 | 43% | 29% | 93% |
|
|
75
|
+
| equations_relations | 18 | 22% | 0% | 94% |
|
|
76
|
+
| expressions | 25 | 32% | 72% | 92% |
|
|
77
|
+
| fraction_decimal | 28 | 29% | 75% | 86% |
|
|
78
|
+
| intervals_sets | 23 | 26% | 0% | 52% |
|
|
79
|
+
| large_numbers | 22 | 45% | 73% | 73% |
|
|
80
|
+
| latex_format | 28 | 29% | 64% | 96% |
|
|
81
|
+
| matrices_vectors | 13 | 31% | 23% | 54% |
|
|
82
|
+
| multiple_answers | 17 | 35% | 0% | 100% |
|
|
83
|
+
| text_answers | 15 | 33% | 20% | 67% |
|
|
84
|
+
| units | 26 | 35% | 0% | 42% |
|
|
85
|
+
| whitespace_punct | 20 | 45% | 35% | 90% |
|
|
86
|
+
| **overall** | **302** | **31.8%** | **36.1%** | **74.2%** |
|
|
87
|
+
| false accepts | | 0 | 0 | 8 |
|
|
88
|
+
| false rejects | | 206 | 29 | 70 |
|
|
89
|
+
| crashed | | 0 | 164 | 0 |
|
|
90
|
+
|
|
91
|
+
*Checkers run with default settings: Math-Verify 0.9, SymPy 1.14 (Lark LaTeX parser), and a
|
|
92
|
+
whitespace/`\boxed` string normalizer. Regenerate with `mathcheck-bench run --checker all --format markdown`.*
|
|
93
|
+
|
|
94
|
+
**What the scorecard shows**
|
|
95
|
+
|
|
96
|
+
- **False accepts** (a wrong answer marked correct) are the dangerous error when a checker is used
|
|
97
|
+
as an RL reward, because the model learns to exploit them. With default settings, Math-Verify
|
|
98
|
+
ignores units (`5 m` = `5 cm`, `1 kg` = `1 g`, `0°C` = `0°F`) and accepts truncated decimals
|
|
99
|
+
(`1/7` = `0.142857`).
|
|
100
|
+
- **False rejects** (a correct answer marked wrong) deflate benchmark scores. Common ones: unit
|
|
101
|
+
conversions (`3 hours` vs `180 minutes`), radians vs degrees, interval vs inequality, e-notation
|
|
102
|
+
(`1e6`), and repeating decimals (`0.\overline{3}`).
|
|
103
|
+
- **Crashes** are reported separately and never counted as a correct "not equivalent" verdict.
|
|
104
|
+
|
|
105
|
+
## Test your own checker
|
|
106
|
+
|
|
107
|
+
A checker is any function `(reference: str, answer: str) -> bool`:
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
# my_checker.py
|
|
111
|
+
def check(reference, answer):
|
|
112
|
+
return reference.strip() == answer.strip()
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
mathcheck-bench run --checker my_checker:check --failures
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Or from Python:
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
from mathcheck_bench import run
|
|
123
|
+
card = run(check, name="mine")
|
|
124
|
+
print(card.accuracy, card.by_category())
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## The data
|
|
128
|
+
|
|
129
|
+
Cases live in [`src/mathcheck_bench/data/cases.jsonl`](src/mathcheck_bench/data/cases.jsonl),
|
|
130
|
+
one JSON object per line:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{"id": "unit-003", "category": "units", "reference": "5 \\text{ m}", "answer": "5 \\text{ cm}", "equivalent": false, "note": "same number, different unit"}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Answers are bare final answers (no surrounding solution text), written in LaTeX without `$`.
|
|
137
|
+
Adapters add whatever wrapping their checker needs.
|
|
138
|
+
|
|
139
|
+
## Contributing
|
|
140
|
+
|
|
141
|
+
Found a pair your checker gets wrong? Add one line. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
Apache-2.0
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
mathcheck_bench/__init__.py,sha256=wmG5Y_jDjDMXKHQ85Qx6jr0oNrOfT1bsHpu4omCZ8wk,250
|
|
2
|
+
mathcheck_bench/cases.py,sha256=J11fUQYJMYgT15JqL2TrnxSy_P8PBZwrUEHqUN0RYmA,1462
|
|
3
|
+
mathcheck_bench/checkers.py,sha256=2Io-BAVDnBwD4C5a23lgo11sgnl4PKnKLQTWPqjHZhI,2117
|
|
4
|
+
mathcheck_bench/cli.py,sha256=RD9O7G_eRxJBGwcdv5d0sAC6RrVc2AKzB_dqihPYmoQ,3386
|
|
5
|
+
mathcheck_bench/runner.py,sha256=j-i3bhTzU1-tv4ApeYpVVPu1dXdJc-hAkcOMCHo7m9w,2669
|
|
6
|
+
mathcheck_bench/data/cases.jsonl,sha256=8E_98A0ejQRM1wAY5_uCzwpi_yEDGrb8P2i48kTWtcc,47201
|
|
7
|
+
mathcheck_bench-0.1.0.dist-info/METADATA,sha256=bwcFtTt1aTDFSFE2RNLjs5y_z8DqGUNjbY7_mk2wY_A,5292
|
|
8
|
+
mathcheck_bench-0.1.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
9
|
+
mathcheck_bench-0.1.0.dist-info/entry_points.txt,sha256=quJShbt4nHMqjgFZJQrOSeLocXk29D6-_C72lNlmltA,61
|
|
10
|
+
mathcheck_bench-0.1.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
11
|
+
mathcheck_bench-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|