feat(reversal): expand dual-class vocabulary
All checks were successful
Security Scan / security (push) Successful in 13s
Test / test (push) Successful in 1m52s

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 04:16:00 +00:00
parent 9de96a76d0
commit 9a58b60f0e
2 changed files with 8 additions and 2 deletions

View file

@ -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)

View file

@ -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{