Archived
Rename: nlg → elp (Engram Language Protocol)
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
// 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())
|
||||
Reference in New Issue
Block a user