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
2026-05-02 22:15:25 -05:00

61 lines
2.8 KiB
EmacsLisp

// lang-hi.el - Hindi NLG tests: SOV assertion, question with क्य particle.
//
// Hindi is SOV, fusional (with postpositions), pro-drop. Questions use the
// "particle" strategy: statement order + क्य (kya) appended at sentence end.
// (See realize_question_lang: code="hi" appends " क्या".)
//
// The verb है (khaati hai) is the feminine singular present form of .
// The base form supplied here is ; the engine will return base form
// unless morphology-hi.el is loaded with full conjugation tables.
//
// Expected outputs (approximate):
// assert: "बिल्ली खाना मछली." (SOV: subject-object-verb)
// question: "बिल्ली खाना मछली क्या?" (SOV + क्य particle)
fn test_assert() -> String {
// SOV: subject=बिल्ल (cat), verb=ख (eat), patient=मछल (fish)
let form: [String] = native_list_empty()
let form = native_list_append(form, "intent")
let form = native_list_append(form, "assert")
let form = native_list_append(form, "agent")
let form = native_list_append(form, "बिल्ली")
let form = native_list_append(form, "predicate")
let form = native_list_append(form, "खाना")
let form = native_list_append(form, "patient")
let form = native_list_append(form, "मछली")
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")
let form = native_list_append(form, "lang")
let form = native_list_append(form, "hi")
return realize(form)
}
fn test_question() -> String {
// Hindi question: SOV statement order + क्य appended by realizer particle strategy
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, "बिल्ली")
let form = native_list_append(form, "predicate")
let form = native_list_append(form, "खाना")
let form = native_list_append(form, "patient")
let form = native_list_append(form, "मछली")
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")
let form = native_list_append(form, "lang")
let form = native_list_append(form, "hi")
return realize(form)
}
println(test_assert())
println(test_question())