list: a named task list is not a grocery item (V-520)
"добавь в список" was a marker in two places: task_phrases.json for task capture, and listCapturePrefixes for the grocery list. ListGrammars is wired before TaskCaptureGrammar in buildRouter, so the list claimed every one of them, and takeListTag does not know "дел" as a list name — "добавь в список дел хлеб" filed a grocery item called "дел хлеб". The bare marker stays a grocery item, because an unnamed list already defaults to покупки and the task side always names its list. A named task list now declines in ParseListCapture, ParseListQuery and ParseListRemove, so the turn falls through to task capture. The bare forms are gone from task_phrases.json, so the data says what the code does rather than being shadowed by grammar order. Reversible if he asks for the other default: move the two bare phrases back and the list will need to decline them instead.
This commit is contained in:
@@ -17,19 +17,23 @@
|
||||
"",
|
||||
"list_nouns are the nouns that make a question be about the list.",
|
||||
"list_shortcut_nouns are the subset that stand alone as a whole utterance",
|
||||
"('задачи'), which the longer nouns do not ('дел')."
|
||||
"('задачи'), which the longer nouns do not ('дел').",
|
||||
"",
|
||||
"The bare 'добавь в список' and 'запиши в список' are deliberately absent",
|
||||
"(Vikunja #520). They are markers on the grocery list too, in list.go, and an",
|
||||
"unnamed list already means покупки there, so the bare form is a grocery item",
|
||||
"and the task side always names its list. The list declines a named task list",
|
||||
"instead of shadowing these by grammar order."
|
||||
],
|
||||
"capture_prefixes": [
|
||||
"добавь в задачи",
|
||||
"добавь в тудушки",
|
||||
"добавь в список задач",
|
||||
"добавь в список дел",
|
||||
"добавь в список",
|
||||
"добавь задачу",
|
||||
"запиши в задачи",
|
||||
"запиши в список дел",
|
||||
"запиши в список задач",
|
||||
"запиши в список",
|
||||
"запиши задачу",
|
||||
"новая задача",
|
||||
"поставь задачу",
|
||||
|
||||
Reference in New Issue
Block a user