Skip to content

D-GRAMMAR-CONSTRAINTS-0: German dative roles as typed relational constraints (lab) - #1947

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/clever-babbage-miiycg
Nov 3, 2026
Merged

AdaWorldAPI merged 2 commits into
mainfrom
claude/clever-babbage-miiycg

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Research crosswalk and lab probe only. This PR adds no parser, no grammar compiler, no new ClassId or F### word, and no production change.

  • Report: .claude/probes/2026-11-03-d-grammar-constraints/REPORT.md
  • Probe: crates/grammar-constraints-probe. It has its own workspace and is added to the root exclude.

Question

Can a grammatical constraint be written as a typed relation over existing observations and answered by the existing DR / RelAlg / mask-risc fold? Where do Constraint Grammar 3, Universal Dependencies (UD), Grammatical Framework (GF), spaCy and MeTTa start to need semantics beyond that fold?

Findings

  • UD German annotates two different roles the same way. In German-GSD the dative recipient of geben (31 cases) and the dative experiencer of gefallen (18 cases) are both obl:arg with Case=Dat. iobj appears once in the whole treebank. UD's German documentation confirms this directly: "verbs of giving … have one oblique dative argument". So a rule that only reads the dependent noun's own annotations cannot tell the two roles apart. The head verb decides.
  • Each role rule runs as one mask-risc program over DR-addressed token lanes. The head verb's lemma is read in place through the head pointer (Pred::EqU32Via). Against an independent gold annotation:
    • 4/4 correct, 0 false positives, 0 false negatives.
    • 1 abstention, reported as UNKNOWN rather than false.
    • The Direction/Purpose ambiguity is kept, not resolved.
    • The hot path allocates 0 bytes and takes about 1.2–1.3 µs for five rules over 40 tokens.
  • All 8 negative controls from the brief behave as predicted. For example, removing the verb-frame constraint produces 4 false positives, and disabling the deprel operand makes a dative instrument come out as a Recipient.
  • 9 source-level disables each turn at least one test red. Two of them initially passed. One was a disable that did not compile (a stray }); the other was a guard no fixture could reach. Both were fixed before these numbers were taken.
  • First missing interface: DT64's WHEN cannot express the head lookup. SetExpr has no leaf that follows the head pointer, so the recipient and experiencer guards normalize to the same witness. Separately, R2IL refuses any WHEN at execution (GuardNotExecutable) and refuses three-valued truth. The head lookup itself only runs through EqU32Via, whose call sites are EXO-140-unclassified.
  • P1 is a census, not an executable test. Across German GSD, Latin PROIEL and English EWT, every role is the head verb's frame combined with an argument slot. The slot itself varies by language:
    • Latin do puts the recipient in obl:arg+Dat.
    • English give puts it in iobj, or in obl with to.
    • English like puts the experiencer in nsubj.

Owner decisions

  • EXO-140 / D-DT64-6: may a WHEN leaf name an equality read through the head pointer?
  • Frame lexicon: where a versioned, language-specific frame lexicon should live.
  • Role vocabulary: which of the two existing 8-element sets is canonical for candidate roles. CE64 Orientation has Core plus 7 functions; DeepNSM-v2's haspelmath set has 8 and includes Judicantis.
  • Ambiguity: one CE64 orientation field holds one role, so a set of alternative roles needs masks or Bag candidates plus an explicit selection policy.

Test plan

cargo test --manifest-path crates/grammar-constraints-probe/Cargo.toml
cargo run --release --manifest-path crates/grammar-constraints-probe/Cargo.toml --example cost

clippy -D warnings and fmt are clean. The UD treebanks (GSD and EWT are CC BY-SA; PROIEL is CC BY-NC-SA) were fetched for measurement only and are not committed.

Refs: #1917 (it names this UD HEAD/DEPREL seam as open), #1942, #1943, #1944; EXO-46, EXO-50, EXO-73, EXO-108, EXO-140.


Generated by Claude Code

…traints (lab)

Research crosswalk of Constraint Grammar 3, Universal Dependencies,
Haspelmath semantic maps, Grammatical Framework, the 2026 Bayesian universals
study and spaCy's matchers, against DR / RelAlg / mask-risc and DT64
ON/WHEN/DO. Completes the lab probe crates/grammar-constraints-probe (own
workspace, excluded from the root workspace) started in the previous commit.

- UD German-GSD gives the recipient of geben and the experiencer of
  gefallen the same annotation (obl:arg + Case=Dat), so a rule over the
  dependent's own lanes cannot separate them; the head hop decides.
- One mask-risc program per rule, head read in place via Pred::EqU32Via:
  4/4 against gold, 0 false positives, 0 false negatives, 1 UNKNOWN
  abstention, Direction/Purpose ambiguity kept, 0 B on the hot path,
  ~1.2 us for five rules over 40 tokens; 8 negative controls as predicted,
  9 source disables red.
- First missing interface: DT64 WHEN (SetExpr) has no hop leaf, and R2IL
  refuses WHEN execution (GuardNotExecutable).
- P1 census (English EWT, Latin PROIEL): same frame x slot shape, slot
  realization language-specific.

No parser, no new ClassId or F### word, no production change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMLBmi7EtDd15CGwGb8
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: af2ef415-90f3-4610-af71-0e54f5bbc95e
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review November 3, 2026 21:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T21:21:53.364584Z ba63ef8 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AdaWorldAPI
AdaWorldAPI merged commit 0df42b9 into main Nov 3, 2026
12 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Nov 3, 2026
Source audit and lab falsifier for two read-only DT64 methods,
CandidateRecipient and CandidateExperiencer, that share obl:arg + Case=Dat
and differ in the head verb's frame. Extends crates/grammar-constraints-probe
(src/when.rs, tests/when.rs, examples/when_cost.rs).

- The #1947 head hop (Pred::EqU32Via, foreign[fk[i]]) is gather-shaped:
  ADMISSION B does not admit a position derived from another column as a
  read address, and EXO-140 is still unclassified. A correction note is
  added to the #1947 report.
- DT64 states the dependent's own conditions but not the head frame (only an
  opaque Sym); admit checks witness equality only; validate does not check
  guard lanes; no read-only DO exists; R2IL still refuses WHEN.
- Co-addressed form ("the join is the layout"): the head's frame as a lane at
  the dependent's coordinate makes the WHEN row-local in today's SetExpr with
  distinct witnesses and no EqU32Via in the query. The cross-row read moves
  into a counted producer (EXO-46 / D-RMAP-1).
- Lab composer: admit, check description against witness, lower description
  and a shared global WHERE into one program. Both forms match an
  independent oracle and gold; 10 negative controls as predicted; 9 source
  disables red; 0 B per hot run.

No production change, no ClassId, no F###.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMLBmi7EtDd15CGwGb8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants