Skip to content

[bug] MATH grader: \displaystyle and \tag{…} survive normalize — break exact match #506

Description

@marktech0813

Problem

Presentation-only tokens left in the normalized string:

normalize_math_answer(r"\displaystyle\frac{1}{2}")  # contains "displaystyle"
score_text("math500", r"\boxed{\displaystyle\frac{1}{2}}", "1/2")  # 0.0
normalize_math_answer(r"5\tag{1}")  # "5\tag{1}"
score_text("math500", r"\boxed{5\tag{1}}", "5")  # 0.0

Expected

\displaystyle deleted; \tag{…} peeled; answers grade equal to plain gold.

Environment

  • origin/main

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions