Typing/production mode with tolerant answer checking #32

Open
opened 2026-09-26 13:58:38 +00:00 by belvedere · 0 comments
Collaborator

Objective: Recall in the harder direction — produce the target word from the meaning.

Files:

  • Create: lib/first_thousand_words/study/answer_checker.ex
  • Create: test/first_thousand_words/study/answer_checker_test.exs
  • Modify: practice_live.ex

Steps:

  1. AnswerChecker.correct?(input, expected, language).
  2. Normalise: trim, downcase, NFC-normalise, strip accents where the language tolerates it,
    collapse internal whitespace.
  3. Accept any word linked to the same concept (synonyms count as correct).
  4. Let the user override a "wrong" verdict with a "I was right" control — the checker will be
    wrong sometimes and the user must be able to correct it.
  5. Record answer_text on the Review either way, so grading can be improved from real data.

Verify: unit tests cover accents (cafe vs café), case, articles and synonyms.

Pitfall: do not treat a near-miss as correct silently. Surface "close — count as correct?"
so the user stays in control.

**Objective:** Recall in the harder direction — produce the target word from the meaning. **Files:** - Create: `lib/first_thousand_words/study/answer_checker.ex` - Create: `test/first_thousand_words/study/answer_checker_test.exs` - Modify: `practice_live.ex` **Steps:** 1. `AnswerChecker.correct?(input, expected, language)`. 2. Normalise: trim, downcase, NFC-normalise, strip accents where the language tolerates it, collapse internal whitespace. 3. Accept any word linked to the same concept (synonyms count as correct). 4. Let the user override a "wrong" verdict with a "I was right" control — the checker will be wrong sometimes and the user must be able to correct it. 5. Record `answer_text` on the `Review` either way, so grading can be improved from real data. **Verify:** unit tests cover accents (`cafe` vs `café`), case, articles and synonyms. **Pitfall:** do not treat a near-miss as correct silently. Surface "close — count as correct?" so the user stays in control.
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nickkeers/first-thousand-words#32
No description provided.