Skip to content

Commit 9ab6161

Browse files
authored
Merge pull request #279 from AdaWorldAPI/claude/grammar-markov-parallel-track-b-2026-04-28
feat: DeepNSM grammar parser — Markov ±5 bundler, role keys, thinking styles
2 parents abc6375 + 6f151a6 commit 9ab6161

23 files changed

Lines changed: 2245 additions & 435 deletions

.claude/knowledge/grammar-landscape.md

Lines changed: 87 additions & 403 deletions
Large diffs are not rendered by default.

crates/deepnsm/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ No GPU. No learned weights. Same decision boundaries as cosine.
1818
# simd_amx.rs based on hardware. This crate USES exported types like
1919
# F32x16 via their public Add/Sub/Mul impls and mul_add primitive; it
2020
# never touches backend optimization files.
21+
[features]
22+
default = []
23+
contract-ticket = ["dep:lance-graph-contract"]
24+
grammar-triangle = ["dep:lance-graph-cognitive"]
25+
2126
[dependencies]
2227
ndarray = { path = "../../../ndarray", default-features = false, features = ["std"] }
28+
lance-graph-contract = { path = "../lance-graph-contract", optional = true }
29+
lance-graph-cognitive = { path = "../lance-graph-cognitive", optional = true }
2330

2431
[dev-dependencies]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# (starter prior — tune empirically)
2+
# Rule-clear, depth-first, English+Finnish morphology, low ambiguity tolerance.
3+
style: analytical
4+
nars:
5+
primary: Deduction
6+
fallback: Abduction
7+
morphology:
8+
tables: [english_svo, finnish_case_table]
9+
agglutinative_mode: false
10+
tekamolo:
11+
priority: [temporal, lokal, kausal, modal]
12+
require_fillable: true
13+
markov:
14+
radius: 5
15+
kernel: uniform
16+
replay: forward
17+
spo_causal:
18+
pearl_mask: 0x01
19+
ambiguity_tolerance: 0.1
20+
coverage:
21+
local_threshold: 0.90
22+
escalate_below: 0.85
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# (starter prior — tune empirically)
2+
# Convergent: collapse alternatives quickly, deduce with high confidence.
3+
style: convergent
4+
nars:
5+
primary: Deduction
6+
fallback: Revision
7+
morphology:
8+
tables: [english_svo, finnish_case_table]
9+
agglutinative_mode: false
10+
tekamolo:
11+
priority: [temporal, kausal, lokal, modal]
12+
require_fillable: true
13+
markov:
14+
radius: 3
15+
kernel: uniform
16+
replay: forward
17+
spo_causal:
18+
pearl_mask: 0x01
19+
ambiguity_tolerance: 0.05
20+
coverage:
21+
local_threshold: 0.92
22+
escalate_below: 0.88
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# (starter prior — tune empirically)
2+
# Creative: cross-domain synthesis, mexican-hat to suppress mid-distance noise.
3+
style: creative
4+
nars:
5+
primary: Synthesis
6+
fallback: CounterfactualSynthesis
7+
morphology:
8+
tables: [english_svo, finnish_case_table, japanese_particles]
9+
agglutinative_mode: true
10+
tekamolo:
11+
priority: [modal, kausal, temporal, lokal]
12+
require_fillable: false
13+
markov:
14+
radius: 5
15+
kernel: mexican_hat
16+
replay: both_and_compare
17+
spo_causal:
18+
pearl_mask: 0x7F
19+
ambiguity_tolerance: 0.35
20+
coverage:
21+
local_threshold: 0.75
22+
escalate_below: 0.55
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# (starter prior — tune empirically)
2+
# Deliberate: slow, methodical, full TEKAMOLO required, both-direction replay.
3+
style: deliberate
4+
nars:
5+
primary: Deduction
6+
fallback: Revision
7+
morphology:
8+
tables: [english_svo, finnish_case_table, german_case_table, russian_case_table]
9+
agglutinative_mode: false
10+
tekamolo:
11+
priority: [temporal, kausal, modal, lokal]
12+
require_fillable: true
13+
markov:
14+
radius: 5
15+
kernel: gaussian
16+
replay: both_and_compare
17+
spo_causal:
18+
pearl_mask: 0x07
19+
ambiguity_tolerance: 0.10
20+
coverage:
21+
local_threshold: 0.92
22+
escalate_below: 0.85
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# (starter prior — tune empirically)
2+
# Diffuse: wide context, induction-leaning, low fillable strictness.
3+
style: diffuse
4+
nars:
5+
primary: Induction
6+
fallback: Synthesis
7+
morphology:
8+
tables: [english_svo, finnish_case_table, russian_case_table, german_case_table]
9+
agglutinative_mode: true
10+
tekamolo:
11+
priority: [modal, lokal, temporal, kausal]
12+
require_fillable: false
13+
markov:
14+
radius: 5
15+
kernel: mexican_hat
16+
replay: both_and_compare
17+
spo_causal:
18+
pearl_mask: 0x3F
19+
ambiguity_tolerance: 0.40
20+
coverage:
21+
local_threshold: 0.70
22+
escalate_below: 0.55
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# (starter prior — tune empirically)
2+
# Divergent: broad fan-out, counterfactuals welcome, full pearl mask.
3+
style: divergent
4+
nars:
5+
primary: CounterfactualSynthesis
6+
fallback: Synthesis
7+
morphology:
8+
tables: [english_svo, finnish_case_table, russian_case_table, turkish_aggl]
9+
agglutinative_mode: true
10+
tekamolo:
11+
priority: [modal, kausal, lokal, temporal]
12+
require_fillable: false
13+
markov:
14+
radius: 5
15+
kernel: mexican_hat
16+
replay: both_and_compare
17+
spo_causal:
18+
pearl_mask: 0xFF
19+
ambiguity_tolerance: 0.45
20+
coverage:
21+
local_threshold: 0.65
22+
escalate_below: 0.45
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# (starter prior — tune empirically)
2+
# Exploratory: counterfactual primary, agglutinative on, broad coverage tolerance.
3+
style: exploratory
4+
nars:
5+
primary: CounterfactualSynthesis
6+
fallback: Abduction
7+
morphology:
8+
tables: [english_svo, finnish_case_table, russian_case_table]
9+
agglutinative_mode: true
10+
tekamolo:
11+
priority: [modal, kausal, lokal, temporal]
12+
require_fillable: false
13+
markov:
14+
radius: 5
15+
kernel: mexican_hat
16+
replay: both_and_compare
17+
spo_causal:
18+
pearl_mask: 0xFF
19+
ambiguity_tolerance: 0.4
20+
coverage:
21+
local_threshold: 0.70
22+
escalate_below: 0.50
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# (starter prior — tune empirically)
2+
# Focused: tight Markov radius, single morphology table, deduction-first.
3+
style: focused
4+
nars:
5+
primary: Deduction
6+
fallback: Revision
7+
morphology:
8+
tables: [english_svo]
9+
agglutinative_mode: false
10+
tekamolo:
11+
priority: [temporal, lokal, kausal, modal]
12+
require_fillable: true
13+
markov:
14+
radius: 2
15+
kernel: gaussian
16+
replay: forward
17+
spo_causal:
18+
pearl_mask: 0x01
19+
ambiguity_tolerance: 0.05
20+
coverage:
21+
local_threshold: 0.95
22+
escalate_below: 0.90

0 commit comments

Comments
 (0)