Files
DeepTutor/web
Benjamin Schwing 702b4854d1 fix(learning): harden numeric answer parsing
Review follow-ups for numeric_equivalent and its web port:

- Limit exponents to two digits; "1.5e10000000" made Fraction
  arithmetic block the event loop for about a minute.
- Treat a separator convention borrowed from the key as a preference,
  not a proof: "-12.500" for "-12500.00" is now ambiguous instead of a
  final "incorrect", since a comma-decimal learner may mean -12500.
- Accept "50%" for a bare "50" key, and two or more decimals that round
  to a fraction key ("0.333" for "1/3").
- Allow at most one trailing unit word; prose ("5 or six"), symbols
  ("3²"), single letters and magnitude words ("Tausend") are no longer
  dropped. Reject repeated signs ("--5").
- Use an absolute epsilon so large integer keys stay exact.
- Align Python and TS on ASCII digits, Unicode spaces and lower().

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 18:38:58 +00:00
..
…