From "Quick" to "Quickly": Programmatic Adverb Formation
par Mansour Ayouni · dans le dépôt depuis le 2025-09-16 · essai de fonction · domaine Agents et conversation
Cet article est écrit en anglais, comme la bibliothèque.
Softanza Adverb() function transforms (any) word into its proper adverbial form, handling English morphology complexities for programmers generating natural language messages. Softanza uses this function in its Explain() methods for data models and visualization, producing descriptions like "This data trends financially upward" or "Performance varies regionally" with domain-specific intelligence and extensible rules.
When "-ly" Isn't Enough
This seems straightforward:
? Adverb("quick") #--> quickly
? Adverb("happy") #--> happily
? Adverb("gentle") #--> gentlyexécuté le 2026-10-08 20:40 au commit 4a184e6f0 : a tenu sa promesse
Add "-ly" and you're done, right? But then you encounter the rebels:
? Adverb("good") #--> well
? Adverb("fast") #--> fast
? Adverb("hard") #--> hardexécuté le 2026-10-08 20:40 au commit 4a184e6f0 : a tenu sa promesse
English refuses to cooperate. "Good" doesn't become "goodly"—it transforms into "well." Some words like "fast" stay unchanged. The simple suffix rule crumbles immediately.
Domain Contexts
Beyond basic morphology, Softanza recognizes that context shapes language. Business and technical domains have their own conventions:
? Adverb("finance") #--> financially
? Adverb("science") #--> scientifically
? Adverb("sales") #--> sales-wise
? Adverb("accounting") #--> from an accounting perspective
? Adverb("marketing") #--> from a marketing perspectiveexécuté le 2026-10-08 20:40 au commit 4a184e6f0 : a tenu sa promesse
Notice how "sales" becomes "sales-wise" rather than "salely"? Or how "accounting" and "marketing" get full prepositional phrases? This isn't arbitrary—it reflects how professionals actually speak in these fields.
Geographic Intelligence
The system understands cultural and geographic terms:
? Adverb("france") #--> french
? Adverb("english") #--> english
? Adverb("arab") #--> arabic
? Adverb("africa") #--> african
? Adverb("north") #--> northern
? Adverb("west") #--> westernexécuté le 2026-10-08 20:40 au commit 4a184e6f0 : a tenu sa promesse
When you say something is done "france," the system knows you mean in a "french" manner, not "francely."
Morphological Patterns
For regular transformations, Softanza handles the systematic patterns English actually follows:
? Adverb("basic") #--> basically (ic → ically)
? Adverb("comfortable") #--> comfortably (able → ably)
? Adverb("play") #--> playily (vowel+y → ily)
? Adverb("dry") #--> drily (consonant+y → ily)illustration
Each pattern captures a real morphological rule, with regex patterns that preserve word stems while transforming endings.
Five Priority Orders
Behind these examples lies a sophisticated priority system that processes adverb transformations through distinct levels:
- Priority 1: Irregulars - Fundamental exceptions that break all rules
- Priority 2: Preservation - Words already functioning as adverbs
- Priority 3: Domain Expertise - Context-aware, field-specific transformations
- Priority 4: Geographic & Cultural - Location and language patterns
- Priority 5: Morphological Patterns - Systematic suffix-based rules
- Priority 6: Fallback - Default "-ly" addition for unknown cases
The Priority System in Action
Watch how priorities resolve conflicts. Consider "business":
? Adverb("business") #--> business-wiseexécuté le 2026-10-08 20:40 au commit 4a184e6f0 : a tenu sa promesse
Why not "businessly"? The system processes:
- Priority 1: Is "business" irregular? No.
- Priority 2: Already an adverb? No.
- Priority 3: Domain pattern match? Yes—apply "business-wise"
The search stops here. Domain-specific rules override morphological patterns.
Practical Limitations and Flexibility
This is a pragmatic tool designed primarily for Softanza's message generation needs. Consider these potential issues:
? Adverb("Education") #--> educationly (incorrect)
? Adverb("payment") #--> paymentally (after adding custom rule)illustration
The system might produce awkward or incorrect results for edge cases or specialized terms outside its current rule coverage. As a programming tool focused on generating humanized messages, it can be valuable for programmers working on similar natural language generation tasks.
The Flexibility Solution
However, the system's strength lies in its adaptability. Programmers can address limitations through dynamic rule addition:
# Correcting problematic cases
AddAdverbRule("^education$", "educationally", "exact", 3, "domain")
? Adverb("education") #--> educationally
# Adding domain-specific rules for your context
AddAdverbRule("^legal$", "legally", "exact", 2, "domain")
? Adverb("legal") #--> legallyexécuté le 2026-10-08 20:40 au commit 4a184e6f0 : a tenu sa promesse
Categories enable systematic management:
? len(GetAdverbRulesByCategory("domain")) #--> 11
? len(GetAdverbRulesByCategory("morphology")) #--> 12illustration
Technical Foundation
Behind these examples lies the AdverbRules data structure:
[ "^good$", "well", "exact", 1, "irregular" ], [ "(.+)ic$", "\\1ically", "regex", 5, "morphology" ],
illustration
The engine sorts by priority and applies matching strategies: exact matching, regex with capture groups, preservation rules, and fallback defaults.
Embracing Imperfection
Softanza's adverb function exemplifies pragmatic design: sophisticated enough to handle most cases correctly, flexible enough to adapt when it doesn't. Rather than pursuing impossible perfection, it provides tools for continuous improvement based on real-world usage and context-specific needs.
Citer
Mansour Ayouni. « From "Quick" to "Quickly": Programmatic Adverb Formation ». Softanza narrations, 2025. https://mayouni.github.io/stzsite/fr/narrations/stz-adverb-engine.html
Exécuté au nom de Haro le 2026-10-08 20:40 dans la bibliothèque au commit 4a184e6f0, bloc après bloc dans un seul processus : 6 bloc(s) sur 10 ont tenu leur promesse ; les autres sont des illustrations. Le code des articles est du code Haro. Là où un article a été écrit avant que la langue prenne son nom actuel, le nom a été changé et rien d'autre. Genre, domaine et série lus dans le nom du fichier, année tirée du premier commit : dérivés, jusqu'à ce que l'article porte son propre en-tête. Le fichier sur GitHub(s'ouvre dans un nouvel onglet)

