half-past hours parse as the hour being entered (V-538)
Russian names a half hour by the hour it is entering, in the genitive, so "половина восьмого" is 07:30 and never 08:30. Neither date parser read that shape, so the reminder parsed to nothing. rewriteHalfPast runs in front of the token pass in SpellOutDigits, so the python parser and the stub both see "в 7:30". It also reads the contracted "полвосьмого" and the quarter-to shape "без четверти восемь", which counts from a cardinal and is 07:45. Minus one is in one place, clockHourBefore, with twelve rather than zero before one. Ordinals eleven and twelve added to the lexicon, because a clock reaches them. Minutes a spoken clock does not use are left alone: a guess here is a missed dose. Classifier + onnx over the routing fixture 58/82 to 62/87, three new cases, none regressed. Python dateparser is not installed on this host, so only the stub was measured. See docs/evals/2026-08-05-half-past-hours.md.
This commit is contained in:
@@ -10,7 +10,7 @@ func TestSpellOutDigits(t *testing.T) {
|
||||
for _, tc := range []struct{ in, want string }{
|
||||
{"напомни мне позвонить маме в семь вечера", "напомни мне позвонить маме в 7 вечера"},
|
||||
{"в три часа дня", "в 3 часа дня"},
|
||||
{"напомни в половине шестого", "напомни в половине шестого"},
|
||||
{"напомни в половине шестого", "напомни в 5:30"},
|
||||
{"через двадцать минут", "через 20 минут"},
|
||||
// Untouched: no time word stands beside the number.
|
||||
{"купить три яблока", "купить три яблока"},
|
||||
|
||||
Reference in New Issue
Block a user