diff --git a/internal/lexicon/lexicon.go b/internal/lexicon/lexicon.go index 1889d7c..31a180a 100644 --- a/internal/lexicon/lexicon.go +++ b/internal/lexicon/lexicon.go @@ -124,6 +124,16 @@ func TaskDoneWords() []string { return words("task_done_words") } // TaskDropWords — see TaskDoneWords. func TaskDropWords() []string { return words("task_drop_words") } +// SlotValueFrame returns the words that can surround a bare slot value without +// making the utterance a request of its own. A caller strips these (along with +// the numbers and the other closed time sets) to see whether an utterance +// carries any content beside the value it was asked for. See the set's note. +func SlotValueFrame() []string { return words("slot_value_frame") } + +// DialogueCancel returns the ways he calls off the request Maven is assembling. +// Distinct from TaskDropWords, which abandons an item that already exists. +func DialogueCancel() []string { return words("dialogue_cancel") } + // 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. diff --git a/internal/lexicon/lexicon_ru_v1.json b/internal/lexicon/lexicon_ru_v1.json index 8feaf89..fb47744 100644 --- a/internal/lexicon/lexicon_ru_v1.json +++ b/internal/lexicon/lexicon_ru_v1.json @@ -197,6 +197,26 @@ "drop", "remove", "cancel", "передумал", "передумала", "неактуально" ] + }, + "slot_value_frame": { + "note": "The words that can stand around a bare slot value without making the utterance a request of its own (Vikunja #560). Prepositions, hedges and the nouns a spoken time is built from: strip these, the numbers, the interrogatives, the filler particles and the other time sets, and whatever is left is the utterance's OWN content. \"а что если в 11:00\" leaves nothing and is an answer; \"какая сейчас погода в Риме\" leaves \"погода\" and \"Риме\" and is not. Closed because each part of it is closed — Russian has a fixed list of prepositions, and a clock is built from a fixed list of nouns. It is not a stopword list: a word goes in only if it can never be the thing he is asking about.", + "words": [ + "в", "во", "на", "к", "ко", "до", "с", "со", "за", "по", "под", "около", "через", "после", "перед", "от", "из", "у", "при", "про", + "at", "on", "in", "by", "to", "till", "until", "after", "before", "about", "for", + "нет", "не", "да", "ага", "угу", "ой", "ох", "тогда", "лучше", "может", "можно", "наверное", "наверно", "пожалуй", "точнее", "скорее", "если", "пусть", "прости", "извини", "слушай", "значит", "как-то", "типа", "вообще-то", + "no", "yes", "yeah", "ok", "okay", "sorry", "maybe", "actually", "rather", "then", "well", + "час", "часа", "часов", "часу", "часам", "минут", "минута", "минуты", "минуту", "минутах", "полдень", "полночь", "полдня", + "утра", "утро", "утру", "дня", "день", "днями", "вечера", "вечер", "вечеру", "ночи", "ночь", "ночью", + "сейчас", "теперь", "сегодняшний", "ближайший", "ближайшее", + "hour", "hours", "minute", "minutes", "noon", "midnight", "am", "pm", "oclock", "now" + ] + }, + "dialogue_cancel": { + "note": "The ways he calls off the request Maven is in the middle of assembling (Vikunja #560). Not task_drop_words: those abandon a Praxis item that exists, these abandon a question she has only just asked, and \"удали\" must never mean the second. Matched as the WHOLE utterance minus its frame, because \"забудь\" alone calls off the reminder and \"забудь купить молоко\" is a sentence with content of its own.", + "words": [ + "отмена", "отмени", "отменить", "отставить", "забудь", "забей", "неважно", "проехали", "передумал", "передумала", + "cancel", "nevermind", "forget" + ] } } }