a bare "напомни" asks instead of failing to parse (V-548)
The subjectless-reminder gate has been dead since V-383. It tested `d.Slots.Text == ""`, and that slot is never empty: fillSlots hands it the utterance when the model names nothing narrower. Measured on the box on 05-08-2026 — "напомни" alone routed to IntentReminder with Text:напомни, reached actionReminder, and answered "не получилось разобрать время напоминания." A parse error for a request he never finished asking about. "ну напомни же" did the same. The test is now what the slot CONTAINS. reminderHasSubject discounts the reminder verb by lemma and the filler particles, and asks whether anything is left. A day or an hour counts as a subject, which is why this does not reuse cmd/mavend/reminderbody.go — that one strips the time words too. filler_particles is the lexicon's 16th set. Not a stopword list: every word in it is one that cannot BE a reminder's subject. Measured against the 87-case fixture with and without the change: 65/87 both ways, identical clarify counts, because no case exercised the shape. So amb-007 "напомни" and amb-008 "ну напомни же" were added, both want_clarify. At 89 cases the cascade scores 67/89 (75.3% full, 79.8% intent-only), 3 false clarifies / 1 missed, p50 1.199s — the two new cases clarify, and nothing else moved. The classifier path still guesses both (62/89, 8 missed clarify); the gate is on the LLM arm only. The box needs a rebuild for this to take effect. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SoL7EBdYC5Mhz3DJd49GJy
This commit is contained in:
@@ -64,6 +64,7 @@ func mustLoad() lexiconFile {
|
||||
"interrogatives", "capture_verbs", "narrative_requests", "cardinals", "ordinals",
|
||||
"day_offsets", "weekdays", "months_genitive", "hours_spoken",
|
||||
"not_place_after_v", "parts_of_day", "reminder_verbs", "half_hour",
|
||||
"filler_particles",
|
||||
} {
|
||||
s, ok := f.Sets[name]
|
||||
if !ok || (len(s.Words) == 0 && len(s.Values) == 0) {
|
||||
@@ -112,6 +113,19 @@ func PartsOfDay() []string { return words("parts_of_day") }
|
||||
// ReminderVerbs returns the imperatives that open a reminder.
|
||||
func ReminderVerbs() []string { return words("reminder_verbs") }
|
||||
|
||||
// IsFillerParticle reports whether a word can never be the subject of a
|
||||
// request: a particle, a politeness word, or the first-person object. See the
|
||||
// set's own note for why this is not a stopword list.
|
||||
func IsFillerParticle(word string) bool {
|
||||
w := norm(word)
|
||||
for _, p := range ru.Sets["filler_particles"].Words {
|
||||
if w == p {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// HalfHourWords returns those forms, for a caller folding every time word into
|
||||
// one set rather than asking about one word.
|
||||
func HalfHourWords() []string { return words("half_hour") }
|
||||
|
||||
@@ -173,6 +173,14 @@
|
||||
"половина", "половине", "половину", "половины", "пол",
|
||||
"half"
|
||||
]
|
||||
},
|
||||
"filler_particles": {
|
||||
"note": "Words that carry no subject of their own: particles, the politeness words, and the first-person object he addresses her with. A caller asking \"did he say WHAT to remind him about\" has to discount these, or \"ну напомни же\" and \"напомни мне пожалуйста\" both read as a reminder whose subject is the particle. Closed in the sense that matters: these are function words, and the language is not adding any. Not a stopword list — a stopword list is a scoring convenience and may be as long as it likes, while every word here has to be one that cannot BE a reminder's subject.",
|
||||
"words": [
|
||||
"ну", "же", "уж", "там", "вот", "пожалуйста", "плиз", "ка",
|
||||
"давай", "давай-ка", "а", "и", "бы", "мне", "меня", "мной",
|
||||
"please", "just", "hey", "me"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user