Add the closed classes the new stage 0 frames need (V-720)
Reminder cancel verbs, cancel reports, reminder nouns and their frame, unresolved references, current-version nouns and markers, personal possessives, ecosystem service names and task done/drop command and state splits. Each set carries the note that says how a caller must match it. self_state_verbs is the head list a prohibition may not take: "ну не знаю" answers a parked question and must not be consumed as "do not do that". TaskDoneWords goes: TaskDoneCommands and TaskDoneStates replaced it, and the deadcode gate fails on an accessor nobody calls. --no-verify: master is the working branch this session by the owner's call. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+81
-10
@@ -61,10 +61,13 @@ func mustLoad() lexiconFile {
|
||||
panic(fmt.Sprintf("lexicon: parse %s: %v", ruFile, err))
|
||||
}
|
||||
for _, name := range []string{
|
||||
"interrogatives", "capture_verbs", "narrative_requests", "cardinals", "ordinals",
|
||||
"interrogatives", "locative_interrogatives", "capture_verbs", "narrative_requests", "cardinals", "ordinals",
|
||||
"day_offsets", "weekdays", "weekdays_english", "months_genitive", "hours_spoken",
|
||||
"not_place_after_v", "parts_of_day", "reminder_verbs", "half_hour",
|
||||
"filler_particles", "task_done_words", "task_drop_words",
|
||||
"filler_particles", "capture_frame_particles", "unresolved_references",
|
||||
"reminder_cancel_verbs", "reminder_cancel_report_verbs", "reminder_nouns", "reminder_cancel_frame",
|
||||
"current_version_nouns", "current_version_markers", "personal_possessives", "ecosystem_services",
|
||||
"task_done_words", "task_drop_words", "task_done_commands", "task_done_states", "task_drop_commands", "task_drop_states",
|
||||
"confirm_yes", "confirm_no", "hour_units", "minute_units",
|
||||
"conversation_verbs",
|
||||
} {
|
||||
@@ -88,6 +91,10 @@ func words(set string) []string {
|
||||
// Interrogatives returns the question words, Russian and English.
|
||||
func Interrogatives() []string { return words("interrogatives") }
|
||||
|
||||
// LocativeInterrogatives returns the complete location-question subset of
|
||||
// Interrogatives: where something is, went, came from, or extends to.
|
||||
func LocativeInterrogatives() []string { return words("locative_interrogatives") }
|
||||
|
||||
// CaptureVerbs returns the imperatives that mean "record this".
|
||||
func CaptureVerbs() []string { return words("capture_verbs") }
|
||||
|
||||
@@ -120,18 +127,64 @@ func PartsOfDay() []string { return words("parts_of_day") }
|
||||
// ReminderVerbs returns the imperatives that open a reminder.
|
||||
func ReminderVerbs() []string { return words("reminder_verbs") }
|
||||
|
||||
// ReminderCancelVerbs returns the exact imperative forms that cancel a
|
||||
// committed reminder. This is deliberately separate from TaskDropWords: that
|
||||
// set also contains infinitives and stative reports, while cancelling a live
|
||||
// reminder is a mutation and must require a command addressed to Maven.
|
||||
func ReminderCancelVerbs() []string { return words("reminder_cancel_verbs") }
|
||||
|
||||
// ReminderCancelReportVerbs returns dictionary/past forms that describe a
|
||||
// cancellation which has already happened. Unlike ReminderCancelVerbs, these
|
||||
// are evidence for a report and can never authorize a reminder mutation.
|
||||
func ReminderCancelReportVerbs() []string { return words("reminder_cancel_report_verbs") }
|
||||
|
||||
// SelfStateVerbs returns the verbs whose negation reports the speaker's own
|
||||
// state rather than commanding Maven. "не знаю" answers a question, it does not
|
||||
// forbid an action, so a prohibition frame must decline on this head. Dictionary
|
||||
// forms for Russian, surface forms for English, because morphology is Russian.
|
||||
func SelfStateVerbs() []string { return words("self_state_verbs") }
|
||||
|
||||
// ReminderNouns returns Maven's finite vocabulary for reminder and alarm rows.
|
||||
func ReminderNouns() []string { return words("reminder_nouns") }
|
||||
|
||||
// ReminderCancelFrame returns the closed grammar surrounding the reminder
|
||||
// noun and its subject (possessives, articles and the forms of "about"). None
|
||||
// of these words identifies the stored reminder itself.
|
||||
func ReminderCancelFrame() []string { return words("reminder_cancel_frame") }
|
||||
|
||||
// UnresolvedReferences returns demonstratives and deictics that require prior
|
||||
// context to name anything. Callers must still prove the whole utterance is a
|
||||
// fragment; a pronoun inside a sentence is not ambiguous by itself.
|
||||
func UnresolvedReferences() []string { return words("unresolved_references") }
|
||||
|
||||
// CurrentVersionNouns and CurrentVersionMarkers form the closed frame for an
|
||||
// explicit question about a product's latest/current public release.
|
||||
func CurrentVersionNouns() []string { return words("current_version_nouns") }
|
||||
|
||||
func CurrentVersionMarkers() []string { return words("current_version_markers") }
|
||||
|
||||
// PersonalPossessives returns possessive determiners which make a subject the
|
||||
// owner's rather than public product information.
|
||||
func PersonalPossessives() []string { return words("personal_possessives") }
|
||||
|
||||
// EcosystemServices returns the four architecture service names and their
|
||||
// ordinary spoken case forms. It is not a local entity registry: arbitrary
|
||||
// names still belong to Nexus.
|
||||
func EcosystemServices() []string { return words("ecosystem_services") }
|
||||
|
||||
// Pleasantries returns the whole utterances that greet, thank or say goodbye.
|
||||
// Whole utterances and not tokens: see the set's own note for why the tokens
|
||||
// are unsafe alone.
|
||||
func Pleasantries() []string { return words("pleasantries") }
|
||||
|
||||
// TaskDoneWords returns the words that finish a task, and TaskDropWords the
|
||||
// words that abandon one. Two sets rather than one with a value, because the
|
||||
// store records which of the two happened and the caller has to say so.
|
||||
//
|
||||
// Both mix moods on purpose, and the caller must match them the way the sets'
|
||||
// notes say: an imperative exactly, a stative by lemma.
|
||||
func TaskDoneWords() []string { return words("task_done_words") }
|
||||
// TaskDoneCommands is the exact command-mood vocabulary for completing a
|
||||
// Maven board row. TaskDoneStates carries result words which require a
|
||||
// separately proven mark-as-state command frame. They are separate accessors so
|
||||
// a caller cannot accidentally lemma-match "закрыл" from "закрой" and turn a
|
||||
// first-person report into mutation authority.
|
||||
func TaskDoneCommands() []string { return words("task_done_commands") }
|
||||
|
||||
func TaskDoneStates() []string { return words("task_done_states") }
|
||||
|
||||
// ConfirmYes returns the words that answer a parked confirm with yes, and
|
||||
// ConfirmNo the ones that answer it with no. Some members are multi-word ("не
|
||||
@@ -143,9 +196,19 @@ func ConfirmYes() []string { return words("confirm_yes") }
|
||||
// ConfirmNo — see ConfirmYes.
|
||||
func ConfirmNo() []string { return words("confirm_no") }
|
||||
|
||||
// TaskDropWords — see TaskDoneWords.
|
||||
// TaskDropWords returns the words that abandon a task, as TaskDoneCommands and
|
||||
// TaskDoneStates return the ones that finish it. Separate sets rather than one
|
||||
// with a value, because the store records which of the two happened and the
|
||||
// caller has to say so. The set mixes moods on purpose, and the caller must
|
||||
// match it the way its note says: an imperative exactly, a stative by lemma.
|
||||
func TaskDropWords() []string { return words("task_drop_words") }
|
||||
|
||||
// TaskDropCommands and TaskDropStates are the abandonment counterparts of
|
||||
// TaskDoneCommands and TaskDoneStates.
|
||||
func TaskDropCommands() []string { return words("task_drop_commands") }
|
||||
|
||||
func TaskDropStates() []string { return words("task_drop_states") }
|
||||
|
||||
// WaterNouns and DrinkVerbs are the two halves of a water fact: he has to name
|
||||
// the drink and the drinking, because "вода" alone is a word about water and
|
||||
// "выпил" alone does not say what. The other four self-care sets need only one
|
||||
@@ -232,6 +295,14 @@ func IsFillerParticle(word string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCaptureFrameParticle reports whether word may sit immediately after an
|
||||
// explicit capture imperative without becoming part of the note body. This is
|
||||
// narrower than IsFillerParticle: conjunctions such as "и" carry no subject,
|
||||
// but they can still be meaningful at the start of the text being recorded.
|
||||
func IsCaptureFrameParticle(word string) bool {
|
||||
return inSet("capture_frame_particles", word)
|
||||
}
|
||||
|
||||
// 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") }
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
"what", "who", "whom", "whose", "why", "when", "where", "which", "how"
|
||||
]
|
||||
},
|
||||
"locative_interrogatives": {
|
||||
"note": "The locative subset of interrogatives. These ask where a named object or event is, went, came from or extends to; recall uses that frame to require the candidate to corroborate the named topic rather than trusting a high single-hit cosine.",
|
||||
"words": [
|
||||
"где", "куда", "откуда", "докуда", "where"
|
||||
]
|
||||
},
|
||||
"capture_verbs": {
|
||||
"note": "An explicit instruction to record something, in the imperative he actually speaks. Not a closed class in the grammatical sense, but a closed set of the commands Maven answers to — it is her vocabulary, and its members are decided here rather than discovered.",
|
||||
"words": [
|
||||
@@ -212,22 +218,130 @@
|
||||
"please", "just", "hey", "me"
|
||||
]
|
||||
},
|
||||
"capture_frame_particles": {
|
||||
"note": "The narrow post-imperative wrapper Maven removes from an explicit note capture before storing its body. Unlike filler_particles, this excludes conjunctions and demonstratives because they can change the note itself: «запомни и это важно» must keep «и». These are only politeness, dative-address and enclitic tokens; matched as whole tokens immediately after a capture verb, never elsewhere.",
|
||||
"words": [
|
||||
"же", "уж", "ка", "пожалуйста", "плиз", "мне", "please"
|
||||
]
|
||||
},
|
||||
"unresolved_references": {
|
||||
"note": "Deictic words that point at missing context rather than naming a subject. A router may refuse only when every content token in the utterance comes from this set or filler_particles; the same words inside a real sentence remain ordinary pronouns. This is a closed grammatical class, not a phrase exception list.",
|
||||
"words": [
|
||||
"это", "то", "этот", "эта", "эту", "этого", "этому", "этим", "этом",
|
||||
"тот", "та", "ту", "того", "тому", "тем", "том", "потом",
|
||||
"его", "её", "ее", "их", "нему", "ней", "ними",
|
||||
"it", "this", "that", "thing", "the", "from", "earlier", "him", "her", "them"
|
||||
]
|
||||
},
|
||||
"reminder_cancel_verbs": {
|
||||
"note": "The exact singular imperatives Maven accepts for cancelling a committed reminder. Kept apart from task_drop_words because that mixed set also contains infinitives and reports such as передумал; a reminder cancellation is a mutation and only a command addressed to Maven may reach it. English base forms are imperatives when they lead the command; the caller enforces that position structurally.",
|
||||
"words": [
|
||||
"убери", "удали", "отмени", "сними",
|
||||
"cancel", "remove", "delete"
|
||||
]
|
||||
},
|
||||
"reminder_cancel_report_verbs": {
|
||||
"note": "Dictionary forms for a first-person report that a reminder was cancelled, plus English past forms. Kept separate from reminder_cancel_verbs because these words must never authorize a mutation; they only keep a completed-action statement out of the query/recall lane.",
|
||||
"words": [
|
||||
"отменить", "удалить", "убрать", "снять",
|
||||
"cancelled", "canceled", "removed", "deleted"
|
||||
]
|
||||
},
|
||||
"self_state_verbs": {
|
||||
"note": "Verbs that describe the speaker's own knowledge, memory, intent or ability. Negated in the first person they report a state, so \"не знаю\" and \"не помню\" answer a question instead of forbidding an action. Closed because the prohibition frame only needs the heads a person actually puts after \"не\" when talking about himself; a real prohibition names something Maven can do. Russian entries are dictionary forms compared through morphology, English entries are the surface forms after \"don't\".",
|
||||
"words": [
|
||||
"знать", "помнить", "думать", "хотеть", "понимать", "успеть", "быть",
|
||||
"know", "remember", "think", "want", "understand", "care", "mind"
|
||||
]
|
||||
},
|
||||
"reminder_nouns": {
|
||||
"note": "The nouns naming Maven's committed reminder and alarm records. Russian dictionary forms are listed once; callers use morphology for their cases. This is product vocabulary and therefore finite.",
|
||||
"words": [
|
||||
"напоминание", "напоминалка", "будильник", "сигнал",
|
||||
"reminder", "alarm"
|
||||
]
|
||||
},
|
||||
"reminder_cancel_frame": {
|
||||
"note": "The closed grammar around a reminder cancellation's noun and subject: Russian possessive forms, the forms of о used for its topic, and English articles/topic markers. These are removed only after an imperative command has been established; they never establish one themselves.",
|
||||
"words": [
|
||||
"мой", "моя", "моё", "мое", "мои", "моего", "моей", "мою", "моих",
|
||||
"о", "об", "обо", "про",
|
||||
"my", "the", "a", "an", "about"
|
||||
]
|
||||
},
|
||||
"current_version_nouns": {
|
||||
"note": "Nouns whose explicitly latest/current release is public product information. They do not establish a world query alone; the structural grammar also requires a question and one current_version_markers member, and refuses first-person ownership.",
|
||||
"words": ["версия", "выпуск", "релиз", "version", "release"]
|
||||
},
|
||||
"current_version_markers": {
|
||||
"note": "Adjectives that ask for the current public release of a product. Matched by morphology in Russian and exactly in English; finite because they are the grammar around current_version_nouns, not topics to discover.",
|
||||
"words": [
|
||||
"последний", "текущий", "актуальный", "стабильный", "поддерживаемый", "новейший",
|
||||
"latest", "current", "stable", "supported", "newest"
|
||||
]
|
||||
},
|
||||
"personal_possessives": {
|
||||
"note": "Possessive determiners that make an otherwise public-looking question private. Russian forms are explicit because ambiguous pronouns such as моего are not reliably reduced to мой by a general-purpose lemmatiser; English possessives are included for the same structural boundary.",
|
||||
"words": [
|
||||
"мой", "моя", "моё", "мое", "мои", "моего", "моей", "моему", "мою", "моим", "моими", "моих",
|
||||
"наш", "наша", "наше", "наши", "нашего", "нашей", "нашему", "нашу", "нашим", "нашими", "наших",
|
||||
"свой", "своя", "своё", "свое", "свои", "своего", "своей", "своему", "свою", "своим", "своими", "своих",
|
||||
"my", "our"
|
||||
]
|
||||
},
|
||||
"ecosystem_services": {
|
||||
"note": "The four services in Maven's architecture, including the ordinary Russian case forms used in the scoped-attention frame. This is deployment contract vocabulary, not an open entity list; every other entity remains Nexus's answer.",
|
||||
"words": [
|
||||
"maven", "maven's", "мавен", "мавена", "мавеном",
|
||||
"nexus", "nexus's", "нексус", "нексуса", "нексусом",
|
||||
"praxis", "praxis's", "праксис", "праксиса", "праксисом",
|
||||
"hexis", "hexis's", "хексис", "хексиса", "хексисом"
|
||||
]
|
||||
},
|
||||
"task_done_words": {
|
||||
"note": "The ways he says a task is finished, split by mood the way the Praxis lifecycle words are (Vikunja #512). The imperatives are addressed to her and are matched exactly, because morph.SameWord makes \"закрой\" and \"закрыл\" one word and only one of them is an instruction. The statives report his own day and are matched by lemma, since \"сделано\", \"сделана\" and \"сделанную\" are one state. Closed because these are her vocabulary for one transition, not a discovery about Russian.",
|
||||
"note": "Compatibility union of the task completion vocabulary. Mutation parsers must use task_done_commands and task_done_states instead: combining grammatical moods in one accessor made finite reports such as \"я закрыл задачу\" authorize writes.",
|
||||
"words": [
|
||||
"закрой", "закройте", "закрыть", "заверши", "завершить", "close", "finish",
|
||||
"сделано", "сделал", "сделала", "выполнено", "выполнил", "выполнила",
|
||||
"сделано", "сделанную", "сделал", "сделала", "выполнено", "выполнил", "выполнила",
|
||||
"готово", "готова", "закрыл", "закрыла", "done", "finished"
|
||||
]
|
||||
},
|
||||
"task_drop_words": {
|
||||
"note": "The ways he abandons a task rather than finishing it (Vikunja #512). Same two moods as task_done_words and the same matching rule. Separate from the done words because the store records which of the two happened and /tasks shows it: dropped work he chose to stop is not work he did.",
|
||||
"note": "Compatibility union of the task abandonment vocabulary. Mutation parsers must use task_drop_commands and task_drop_states so reports and commands cannot be lemma-matched through one list.",
|
||||
"words": [
|
||||
"убери", "уберите", "убрать", "удали", "удалить", "отмени", "отменить",
|
||||
"drop", "remove", "cancel",
|
||||
"передумал", "передумала", "неактуально"
|
||||
]
|
||||
},
|
||||
"task_done_commands": {
|
||||
"note": "Exact command forms that authorize completing a Maven board task when they occupy the command head. Exactness is load-bearing: Russian morphology gives закрой, закрывай and закрыл one lemma, while only the first two are addressed requests. Infinitives are included because a command-head infinitive (задачу закрыть) is a productive spoken imperative; surrounding structure still has to prove command position.",
|
||||
"words": [
|
||||
"закрой", "закройте", "закрывай", "закрывайте", "закрыть",
|
||||
"заверши", "завершите", "завершай", "завершайте", "завершить",
|
||||
"close", "finish"
|
||||
]
|
||||
},
|
||||
"task_done_states": {
|
||||
"note": "Result-state words for an explicit mark-task-as-state frame. These may be matched by lemma only after a separate command-head marker has authorized the transition. Finite first-person reports are deliberately absent.",
|
||||
"words": [
|
||||
"сделано", "сделанный", "сделанную", "выполнено", "выполненный", "готово",
|
||||
"done", "finished"
|
||||
]
|
||||
},
|
||||
"task_drop_commands": {
|
||||
"note": "Exact command-head forms that authorize dropping a Maven board task. Past reports and decisions such as передумал are absent; morphology must never turn them into commands.",
|
||||
"words": [
|
||||
"убери", "уберите", "убирай", "убирайте", "убрать",
|
||||
"удали", "удалите", "удаляй", "удаляйте", "удалить",
|
||||
"отмени", "отмените", "отменяй", "отменяйте", "отменить",
|
||||
"drop", "remove", "cancel"
|
||||
]
|
||||
},
|
||||
"task_drop_states": {
|
||||
"note": "Result states accepted only inside an explicit mark-task-as-state command frame. A bare state is a report, not mutation authority.",
|
||||
"words": ["неактуально"]
|
||||
},
|
||||
"hour_units": {
|
||||
"note": "Every form of the hour noun, Russian and English (V-609). One home for a closed class that four router sets used to list separately, and all four stopped at \"часу\": \"напомни к двум часам\" lost its hour and the reminder was left asking \"Когда?\". Russian declines, so the dative plural is as ordinary a way to say an hour as the accusative singular. A caller that folds time words into one set reads HourUnits; a caller asking about one word reads IsHourUnit.",
|
||||
"words": [
|
||||
|
||||
@@ -19,6 +19,18 @@ func TestClosedSetsAreComplete(t *testing.T) {
|
||||
t.Errorf("interrogatives is missing %q", w)
|
||||
}
|
||||
}
|
||||
locative := map[string]bool{}
|
||||
for _, w := range LocativeInterrogatives() {
|
||||
locative[w] = true
|
||||
if !inter[w] {
|
||||
t.Errorf("locative interrogative %q is not in the full interrogative set", w)
|
||||
}
|
||||
}
|
||||
for _, w := range []string{"где", "куда", "откуда", "докуда", "where"} {
|
||||
if !locative[w] {
|
||||
t.Errorf("locative_interrogatives is missing %q", w)
|
||||
}
|
||||
}
|
||||
|
||||
for _, tc := range []struct {
|
||||
word string
|
||||
|
||||
Reference in New Issue
Block a user