elp: native-EL language faculty — comprehension, propositions, multilingual, translation #100
Reference in New Issue
Block a user
Delete Branch "integration/langfaculty-20260814"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Preserving already-committed work from an open worktree during a worktree audit. 10-commit integration branch building an el-native language faculty (elp): comprehension parser + SACRED polarity, ES/PT Romance parser path, propositions READ primitive (memory text -> SACRED triples), multilingual detect + localized phrases, dialogue/self_region summon-through-self port, realizer subordinate-clause/lemmatizer fixes, and EN->ES/PT geometry-native translation. See git log on this branch for full commit-by-commit detail.
auto_term_empty_streak — the counter the 2026-08-06 review added to catch exactly this — read 50 and climbing. Fifty consecutive curiosity scans where the soul's dynamic seeding produced nothing and the loop fell back to four hardcoded phrases. The live WM top said why in one look: every slot was a Memory node labelled "memory:remembered". The extractor read the LABEL only, the sentinel guard correctly rejects sentinels, so there was never anything to extract. It was written against Knowledge nodes, which have real titles, and was structurally blind to the node type that dominates working memory. Rather than add a sixth guard to the five that accumulated across four reviews (genre words, quoted titles, stopwords, label-df), invert the algorithm. The old one was: take the first word, then check whether it is acceptable. That shape forces quality to be expressed as rejection, and rejection can only ever encode floods that already happened. engram_salient_term() scores EVERY candidate token and returns the argmax of idf · position · casing (YAKE, Campos et al. 2020, with real corpus IDF substituted for YAKE's corpus-free proxies), falling back from a sentinel label to the node's content. Term quality becomes the selection criterion instead of a veto: a bad token loses to a better token in the same text without needing to be on any list. Tabu is applied during the argmax, so inhibition-of-return costs seed quality rather than costing the whole scan. Two defects found by instrumenting rather than assuming, which is the lesson this codebase keeps relearning: - The first live run returned five ALL-CAPS terms in a row. Memory content conventionally opens with an all-caps header, so YAKE's acronym bonus was handing the seed to whatever word the heading started with. Restricted to tokens <= 5 chars, where all-caps is evidence of an acronym rather than evidence of a heading. Long headers now compete on specificity. - df via istr_contains is substring matching, so "them" hit inside "theme" and function words came back with nonzero df. Added word-boundary df locally; engram_label_df keeps substring semantics for its callers. An earlier draft claimed the min_df floor subsumed the 73 stopwords that 08-03 measured label-df as missing. Re-measured: about:2, whole:1, them:2 — they clear a floor of 1. The claim was false and the comment now records the correction. The floor buys lexical reachability; the argmax buys quality; the stopword list still earns its keep. Measured on 60 live Memory nodes before shipping: 0 empty, versus 60 of 60 under the old extractor. Terms are topical — HEBBIAN, CONSOLIDATION, TEMPORAL, crash-loop, PRIMING, NEIGHBORHOOD, DRIFT. Three of sixty are weak header words; left alone deliberately, because listing them is the move that produced four blocklists. ENGRAM_ST_DEBUG=1 dumps the scored candidate set. It exists because there was no way to see whether the all-caps run was the corpus or the casing weight without guessing.Ports dialogue.py + self_region.py to native el, bound to the IN-PROCESS engram el runtime (engram_activate_json / engram_neighbors_json / engram_search_json / engram_node_full / engram_connect — C-order builtins, not the wrapper order). self_region.el: pulls the engram's REAL Self/identity nodes (pooled single-term search), scores by self-signal, reads out identity from their own prose — no hardcoded anchors, no template. dialogue.el: ONE operation — project(query) -> land on a region -> read out. * identity = self-region proximity (no intent classifier, no separate branch) * memory = activation + a RELEVANCE FLOOR, then MATERIALIZE by walking the neighborhood (real edges), never top-props * HONEST ABSENCE when nothing is close — no 'I noted that' echo, no fabrication * NEGATION SACRED: readout is the stored prose verbatim, so polarity survives * DIRECTIVE OVERRIDE: a meta-directive switches the reply language Verified against a SCRATCH in-process engram (live :8742 untouched): dialogue gate 9/9 — identity from real self-content, neighborhood materialization, SACRED negation (self + memory), PT identity in PT, directive override to English, 'Prove it' -> honest absence. EN/Romance/prop/multilingual gates unregressed.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.