mirror of
https://github.com/deunix-educ/aventuriers-des-mots.git
synced 2026-10-13 02:11:58 +02:00
Require capitalization and final punctuation again; add a UI reminder
Follow-up to the previous commit: testing further showed a missing
initial capital also fails validation, which raised the real
question (CLAUDE.md: ask rather than decide alone on an ambiguous
pedagogical point) — is sentence-initial capitalization and final
punctuation something the audio should convey, or a general writing
convention the child applies regardless of what they hear?
Decided: a general convention, like in a real classroom dictée. So
both stay required, and the terminal-punctuation tolerance added in
the previous commit is reverted (DictationAnalyzer back to comparing
the text as-is).
Since the audio still can't vocalize either rule, the child needs to
be told some other way: added a permanent reminder label to the
dictation scene ("N'oublie pas : une majuscule au début de la phrase
et un point à la fin !"), sourced from data/localization/fr.json.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -67,21 +67,13 @@ func test_normalizes_before_comparing() -> void:
|
||||
assert_true(result.is_correct)
|
||||
|
||||
|
||||
## L'audio provisoire ne fait entendre aucune ponctuation (voir
|
||||
## docs/specs/decisions.md, point 19/20) : l'omettre n'est pas une erreur.
|
||||
func test_missing_terminal_punctuation_is_still_correct() -> void:
|
||||
## Majuscule initiale et point final sont des conventions generales d'ecriture
|
||||
## (voir docs/specs/decisions.md, point 22), exigees comme n'importe quel
|
||||
## autre mot : l'enfant en est informe par un rappel affiche, pas par une
|
||||
## tolerance a la correction.
|
||||
func test_missing_terminal_punctuation_is_an_error() -> void:
|
||||
var result := DictationAnalyzer.analyze(dictation, "Les petits chats dorment")
|
||||
assert_true(result.is_correct)
|
||||
|
||||
|
||||
func test_different_terminal_punctuation_is_still_correct() -> void:
|
||||
var result := DictationAnalyzer.analyze(dictation, "Les petits chats dorment!")
|
||||
assert_true(result.is_correct)
|
||||
|
||||
|
||||
func test_terminal_punctuation_tolerance_does_not_hide_a_real_error_on_the_last_word() -> void:
|
||||
var result := DictationAnalyzer.analyze(dictation, "Les petits chats dorme")
|
||||
assert_false(result.is_correct)
|
||||
assert_eq(result.errors.size(), 1)
|
||||
assert_eq(result.errors[0]["found"], "dorme")
|
||||
assert_eq(result.errors[0]["found"], "dorment")
|
||||
assert_eq(result.errors[0]["expected"], "dorment.")
|
||||
|
||||
Reference in New Issue
Block a user