This repository has been archived on 2026-05-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
elp/tests/examples/verb-conjugation.el
Will Anderson 2a6d70b959 Add native El NLG system: morphology, vocabulary, grammar, realizer
Implements a complete natural language generation stack in El:
- morphology.el: English pluralization, verb conjugation (40+ irregulars), determiner agreement
- vocabulary.el: inline seed lexicon (~100 entries: pronouns, nouns, verbs, adjectives, etc.)
- grammar.el: CFG rules (S/NP/VP/PP), slot-map driven tree generator, s-expression renderer
- realizer.el: semantic form -> English text with tense/aspect/agreement, do-support for questions
- nlg.el: JSON-driven public API tying all modules together
- tests/run.sh: acceptance corpus runner (6 tests, all passing)
2026-05-02 14:16:23 -05:00

16 lines
643 B
EmacsLisp

// verb-conjugation.el - Test verb conjugation.
//
// Expected: "ran|walked|is|am|sleeping"
fn run_test() -> String {
let r: [String] = native_list_empty()
let r = native_list_append(r, verb_form("run", "past", "third", "singular"))
let r = native_list_append(r, verb_form("walk", "past", "third", "singular"))
let r = native_list_append(r, verb_form("be", "present", "third", "singular"))
let r = native_list_append(r, verb_form("be", "present", "first", "singular"))
let r = native_list_append(r, verb_form("sleep","progressive","third","singular"))
return str_join(r, "|")
}
println(run_test())