Grammar engine for Go. Provides forward composition primitives (PastTense, Gerund, Pluralize, Article, composite progress and label functions), a T() translation entry point with namespace key handlers, and a reversal engine that recovers base forms and grammatical roles from inflected text. The reversal package produces GrammarImprint feature vectors for semantic similarity scoring, builds reference domain distributions, performs anomaly detection, and includes a 1B model pre-sort pipeline for training data classification. Consumers bring their own translation keys; this library provides the grammatical machinery.
Module: dappco.re/go/core/i18nLicence: EUPL-1.2
Language: Go 1.25
Quick Start
import"dappco.re/go/core/i18n"// Grammar primitivesfmt.Println(i18n.PastTense("delete"))// "deleted"fmt.Println(i18n.Gerund("build"))// "building"fmt.Println(i18n.Pluralize("file",3))// "files"// Translation with auto-composed outputfmt.Println(i18n.T("i18n.progress.build"))// "Building..."fmt.Println(i18n.T("i18n.done.delete","file"))// "File deleted"// Reversal: recover grammar from texttokeniser:=reversal.NewTokeniser()tokens:=tokeniser.Tokenise("deleted the files")imprint:=reversal.NewImprint(tokens)