From 9a58b60f0e779bdf19a759e581f4ed6d4d1ba156 Mon Sep 17 00:00:00 2001 From: Virgil Date: Thu, 2 Apr 2026 04:16:00 +0000 Subject: [PATCH] feat(reversal): expand dual-class vocabulary Co-Authored-By: Virgil --- reversal/tokeniser_test.go | 4 ++-- types.go | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/reversal/tokeniser_test.go b/reversal/tokeniser_test.go index bc6e142..854fe8e 100644 --- a/reversal/tokeniser_test.go +++ b/reversal/tokeniser_test.go @@ -725,13 +725,13 @@ func TestTokeniser_DualClassDetection(t *testing.T) { } } - for _, word := range []string{"change", "export", "function", "handle", "host", "import", "link", "log", "merge", "patch", "process", "queue", "release", "stream", "tag", "trigger", "watch"} { + for _, word := range []string{"change", "export", "function", "handle", "host", "import", "link", "log", "merge", "patch", "process", "pull", "push", "queue", "release", "stream", "tag", "trigger", "update", "watch"} { if !tok.IsDualClass(word) { t.Errorf("%q should be dual-class after expansion", word) } } - notDual := []string{"delete", "go", "push", "branch", "repo"} + notDual := []string{"delete", "go", "branch", "repo"} for _, word := range notDual { if tok.IsDualClass(word) { t.Errorf("%q should not be dual-class", word) diff --git a/types.go b/types.go index 3218c3b..7c16616 100644 --- a/types.go +++ b/types.go @@ -467,10 +467,13 @@ var dualClassVerbs = map[string]VerbForms{ "process": {Past: "processed", Gerund: "processing"}, "queue": {Past: "queued", Gerund: "queuing"}, "release": {Past: "released", Gerund: "releasing"}, + "pull": {Past: "pulled", Gerund: "pulling"}, + "push": {Past: "pushed", Gerund: "pushing"}, "stream": {Past: "streamed", Gerund: "streaming"}, "tag": {Past: "tagged", Gerund: "tagging"}, "trigger": {Past: "triggered", Gerund: "triggering"}, "watch": {Past: "watched", Gerund: "watching"}, + "update": {Past: "updated", Gerund: "updating"}, } // dualClassNouns mirrors the same vocabulary as nouns so the tokeniser can @@ -489,10 +492,13 @@ var dualClassNouns = map[string]string{ "process": "processes", "queue": "queues", "release": "releases", + "pull": "pulls", + "push": "pushes", "stream": "streams", "tag": "tags", "trigger": "triggers", "watch": "watches", + "update": "updates", } var vowelSounds = map[string]bool{ -- 2.45.3