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

25 lines
952 B
EmacsLisp

// question.el - Realize "Do you see the dog?"
//
// SemanticForm: question, agent=you, predicate=see, patient=the dog, present simple.
fn run_test() -> String {
let form: [String] = native_list_empty()
let form = native_list_append(form, "intent")
let form = native_list_append(form, "question")
let form = native_list_append(form, "agent")
let form = native_list_append(form, "you")
let form = native_list_append(form, "predicate")
let form = native_list_append(form, "see")
let form = native_list_append(form, "patient")
let form = native_list_append(form, "the dog")
let form = native_list_append(form, "location")
let form = native_list_append(form, "")
let form = native_list_append(form, "tense")
let form = native_list_append(form, "present")
let form = native_list_append(form, "aspect")
let form = native_list_append(form, "simple")
return realize(form)
}
println(run_test())