9b63a2a23b
Adds the missing middle of the ELP: a deterministic EN-content-lemma ->
target-lemma bridge (translate.el) on top of comprehend.el (parse) and
realizer.el (inflect). English-only engram geometry cannot route
cross-lingually and vocabulary-XX.el carries no en_translation glosses, so
the honest no-LLM bridge is a wired lexicon (poem coverage; OOV passes
through). SACRED polarity/neg_word are carried untouched: 'never' localizes
to a negator ('nunca'), never to a content lemma.
Additive realizer extensions: agent_person/agent_number recognize Romance
target pronouns; the non-EN negation branch surfaces a carried neg_word
instead of the generic negator.
Verified on the real toolchain (elc->cc->run):
'You never fought the ocean.' -> ES 'Tú nunca luchaste el océano.'
'I never saw the breaking.' -> ES 'Yo nunca vi la ruptura.'
nunca holds 3/3 negation lines. Known gaps: PT verb conjugation fallback
(lutarred), irregular EN lemma (broke->break), adjunct/subordinator passthrough.
45 lines
2.0 KiB
EmacsLisp
45 lines
2.0 KiB
EmacsLisp
// translate_negation_gate.el - EN -> ES/PT translation of the poem's negation
|
|
// lines. The bar (Aug-13 python reference):
|
|
// l11 "You never fought the ocean." -> "Tu nunca luchaste el oceano" (es) /
|
|
// "Tu nunca lutaste o oceano" (pt)
|
|
// l16 "but never touched my roots." -> "...nunca toco los raices" /
|
|
// "...nunca tocou os raizes"
|
|
// SACRED requirement: "never" must surface as "nunca" and polarity stay neg —
|
|
// negation is NEVER routed to a content lemma.
|
|
|
|
fn tg_line(text: String) -> String {
|
|
let spec: [String] = parse_spec(text)
|
|
let pol: String = slots_get(spec, "polarity")
|
|
let negw: String = slots_get(spec, "neg_word")
|
|
let pred: String = slots_get(spec, "predicate")
|
|
let pat: String = slots_get(spec, "patient")
|
|
let es: String = translate_line(text, "es")
|
|
let pt: String = translate_line(text, "pt")
|
|
let out: String = "EN: " + text + "\n"
|
|
let out = out + " spec: pol=" + pol + " neg_word=" + negw + " pred=" + pred + " patient=" + pat + "\n"
|
|
let out = out + " ES: " + es + "\n"
|
|
let out = out + " PT: " + pt + "\n"
|
|
// SACRED check: if source is negative, "nunca" must appear in both surfaces.
|
|
let es_ok: String = "n/a"
|
|
if str_eq(pol, "neg") {
|
|
let es_ok = "NUNCA-LOST"
|
|
if str_contains(es, "nunca") { let es_ok = "nunca-ok" }
|
|
}
|
|
let out = out + " negation[es]: " + es_ok + "\n"
|
|
return out
|
|
}
|
|
|
|
fn run_translate_negation_gate() -> String {
|
|
let rep: String = "==== ELP EN->ES/PT translation — negation lines ====\n"
|
|
// Negation lines (SACRED nunca must hold):
|
|
let rep = rep + tg_line("You never fought the ocean.")
|
|
let rep = rep + tg_line("but never touched my roots.")
|
|
let rep = rep + tg_line("I never saw the breaking.")
|
|
// Affirmative controls:
|
|
let rep = rep + tg_line("You waited like the shoreline.")
|
|
let rep = rep + tg_line("I broke against your truth.")
|
|
return rep
|
|
}
|
|
|
|
println(run_translate_negation_gate())
|