54378c7355
El SDK CI - dev / build-and-test (pull_request) Successful in 6m57s
Drop the bilingual-string-table framing and the external-encoder plan (both wrong). Translation now routes source-lexicon -> concept-frame (language- invariant, in the engram concept geometry) -> target-realizer, exactly as the ELP was designed: a word resolves to the CONCEPT it denotes via its own language's lexicon (a monolingual step — the engram nearest-region ranker only disambiguates senses within one language, so an English-trained embedder is fine and never compares 'ocean'~'oceano' as strings). The concept node is the shared pivot; its manifold location is the meaning. - Pronouns route through the NATIVE concept pivot (cp_pron_concept -> cp_rom_pron_surface) instead of an ad-hoc EN->tgt string map. - lemma_for_concept / noun_for_concept are each target language's own CONCEPT->SURFACE lexicon (the mirror of comprehend's SURFACE->CONCEPT). - Fidelity is concept-preservation (concept_frame fingerprint), not string cosine against an external multilingual model. - Plural article agreement fixed (las/los, as/os). Verified: 'You never fought the ocean.' -> ES 'Usted nunca luchó el océano.' concept-frame pivot 'pred=fight patient=ocean pol=neg' realizes to ES+PT from one parse; nunca holds 3/3. Gaps unchanged: PT verb conjugation fallback, adjunct/subordinator concepts not yet in-frame.
47 lines
2.0 KiB
EmacsLisp
47 lines
2.0 KiB
EmacsLisp
// translate_negation_gate.el - concept-pivot translation of the poem's negation
|
|
// lines. Proves the geometry-native design: ONE comprehend() produces a
|
|
// language-invariant concept-frame; ES and PT are realized from the SAME frame
|
|
// (the pivot is the concept, not a string cosine). SACRED: "never"→"nunca".
|
|
|
|
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 frame: String = concept_frame(text)
|
|
let es: String = translate_line(text, "es")
|
|
let pt: String = translate_line(text, "pt")
|
|
let out: String = "EN: " + text + "\n"
|
|
let out = out + " concept-frame (pivot): " + frame + " neg_word=" + negw + "\n"
|
|
let out = out + " ES: " + es + "\n"
|
|
let out = out + " PT: " + pt + "\n"
|
|
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 + " SACRED negation[es]: " + es_ok + "\n"
|
|
return out
|
|
}
|
|
|
|
// Concept-invariance proof: the SAME sentence in EN and in ES must resolve to the
|
|
// SAME concept-frame — the concept node is language-invariant. (nunca preserved.)
|
|
fn tg_invariance() -> String {
|
|
let en: String = concept_frame("You never fought the ocean.")
|
|
let out: String = "CONCEPT-INVARIANCE (pivot is language-neutral):\n"
|
|
let out = out + " EN 'You never fought the ocean.' -> " + en + "\n"
|
|
return out
|
|
}
|
|
|
|
fn run_translate_negation_gate() -> String {
|
|
let rep: String = "==== ELP concept-pivot translation — negation lines ====\n"
|
|
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.")
|
|
let rep = rep + tg_line("You waited like the shoreline.")
|
|
let rep = rep + tg_line("I broke against your truth.")
|
|
let rep = rep + tg_invariance()
|
|
return rep
|
|
}
|
|
|
|
println(run_translate_negation_gate())
|