Archived
41 lines
1.6 KiB
EmacsLisp
41 lines
1.6 KiB
EmacsLisp
// lang-he.el - Hebrew NLG tests
|
|
//
|
|
// Hebrew SVO: "הכלב רואה את החתול" (ha-kelev ro'e et ha-xatul)
|
|
// "the-dog sees ACC the-cat"
|
|
//
|
|
// Modern Hebrew uses:
|
|
// - SVO word order
|
|
// - Zero copula in present tense ("הוא גדול" = "he big" = "he is big")
|
|
// - Rising intonation for questions (no morphological change; "?" added by realizer)
|
|
// - Definite article ה (ha-) prefixed directly to the noun
|
|
//
|
|
// Note: Hebrew Unicode strings display as numeric hashes in the current El
|
|
// runtime (UTF-8 output not yet implemented). The strings are semantically
|
|
// correct internally and will display properly once the VM gains UTF-8 output.
|
|
//
|
|
// Transliterated inputs used below ("hu" = הוא he/him, "lir'ot" = to see,
|
|
// "gadol" = big/large) are handled by sem_frame_lang and passed through
|
|
// to he_conjugate / he_noun_phrase via the morphology dispatcher.
|
|
//
|
|
// Expected outputs (approximate, once UTF-8 output is live):
|
|
// assert: "הוא רואה." (hu ro'e. — he sees.)
|
|
// question: "הוא רואה?" (hu ro'e? — he sees?)
|
|
// description: "הוא גדול." (hu gadol. — he [is] big.)
|
|
// (zero copula: no verb in present description)
|
|
|
|
fn test_assert() -> String {
|
|
return sem_realize(sem_frame_lang("assert", "hu", "lir'ot", "", "he"))
|
|
}
|
|
|
|
fn test_question() -> String {
|
|
return sem_realize(sem_frame_lang("query", "hu", "lir'ot", "", "he"))
|
|
}
|
|
|
|
fn test_description() -> String {
|
|
return sem_realize(sem_frame_lang("describe", "hu", "gadol", "", "he"))
|
|
}
|
|
|
|
println(test_assert())
|
|
println(test_question())
|
|
println(test_description())
|