Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
490 changes: 87 additions & 403 deletions .claude/knowledge/grammar-landscape.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions crates/deepnsm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ No GPU. No learned weights. Same decision boundaries as cosine.
# simd_amx.rs based on hardware. This crate USES exported types like
# F32x16 via their public Add/Sub/Mul impls and mul_add primitive; it
# never touches backend optimization files.
[features]
default = []
contract-ticket = ["dep:lance-graph-contract"]
grammar-triangle = ["dep:lance-graph-cognitive"]

[dependencies]
ndarray = { path = "../../../ndarray", default-features = false, features = ["std"] }
lance-graph-contract = { path = "../lance-graph-contract", optional = true }
lance-graph-cognitive = { path = "../lance-graph-cognitive", optional = true }

[dev-dependencies]
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/analytical.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Rule-clear, depth-first, English+Finnish morphology, low ambiguity tolerance.
style: analytical
nars:
primary: Deduction
fallback: Abduction
morphology:
tables: [english_svo, finnish_case_table]
agglutinative_mode: false
tekamolo:
priority: [temporal, lokal, kausal, modal]
require_fillable: true
markov:
radius: 5
kernel: uniform
replay: forward
spo_causal:
pearl_mask: 0x01
ambiguity_tolerance: 0.1
coverage:
local_threshold: 0.90
escalate_below: 0.85
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/convergent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Convergent: collapse alternatives quickly, deduce with high confidence.
style: convergent
nars:
primary: Deduction
fallback: Revision
morphology:
tables: [english_svo, finnish_case_table]
agglutinative_mode: false
tekamolo:
priority: [temporal, kausal, lokal, modal]
require_fillable: true
markov:
radius: 3
kernel: uniform
replay: forward
spo_causal:
pearl_mask: 0x01
ambiguity_tolerance: 0.05
coverage:
local_threshold: 0.92
escalate_below: 0.88
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/creative.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Creative: cross-domain synthesis, mexican-hat to suppress mid-distance noise.
style: creative
nars:
primary: Synthesis
fallback: CounterfactualSynthesis
morphology:
tables: [english_svo, finnish_case_table, japanese_particles]
agglutinative_mode: true
tekamolo:
priority: [modal, kausal, temporal, lokal]
require_fillable: false
markov:
radius: 5
kernel: mexican_hat
replay: both_and_compare
spo_causal:
pearl_mask: 0x7F
ambiguity_tolerance: 0.35
coverage:
local_threshold: 0.75
escalate_below: 0.55
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/deliberate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Deliberate: slow, methodical, full TEKAMOLO required, both-direction replay.
style: deliberate
nars:
primary: Deduction
fallback: Revision
morphology:
tables: [english_svo, finnish_case_table, german_case_table, russian_case_table]
agglutinative_mode: false
tekamolo:
priority: [temporal, kausal, modal, lokal]
require_fillable: true
markov:
radius: 5
kernel: gaussian
replay: both_and_compare
spo_causal:
pearl_mask: 0x07
ambiguity_tolerance: 0.10
coverage:
local_threshold: 0.92
escalate_below: 0.85
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/diffuse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Diffuse: wide context, induction-leaning, low fillable strictness.
style: diffuse
nars:
primary: Induction
fallback: Synthesis
morphology:
tables: [english_svo, finnish_case_table, russian_case_table, german_case_table]
agglutinative_mode: true
tekamolo:
priority: [modal, lokal, temporal, kausal]
require_fillable: false
markov:
radius: 5
kernel: mexican_hat
replay: both_and_compare
spo_causal:
pearl_mask: 0x3F
ambiguity_tolerance: 0.40
coverage:
local_threshold: 0.70
escalate_below: 0.55
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/divergent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Divergent: broad fan-out, counterfactuals welcome, full pearl mask.
style: divergent
nars:
primary: CounterfactualSynthesis
fallback: Synthesis
morphology:
tables: [english_svo, finnish_case_table, russian_case_table, turkish_aggl]
agglutinative_mode: true
tekamolo:
priority: [modal, kausal, lokal, temporal]
require_fillable: false
markov:
radius: 5
kernel: mexican_hat
replay: both_and_compare
spo_causal:
pearl_mask: 0xFF
ambiguity_tolerance: 0.45
coverage:
local_threshold: 0.65
escalate_below: 0.45
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/exploratory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Exploratory: counterfactual primary, agglutinative on, broad coverage tolerance.
style: exploratory
nars:
primary: CounterfactualSynthesis
fallback: Abduction
morphology:
tables: [english_svo, finnish_case_table, russian_case_table]
agglutinative_mode: true
tekamolo:
priority: [modal, kausal, lokal, temporal]
require_fillable: false
markov:
radius: 5
kernel: mexican_hat
replay: both_and_compare
spo_causal:
pearl_mask: 0xFF
ambiguity_tolerance: 0.4
coverage:
local_threshold: 0.70
escalate_below: 0.50
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/focused.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Focused: tight Markov radius, single morphology table, deduction-first.
style: focused
nars:
primary: Deduction
fallback: Revision
morphology:
tables: [english_svo]
agglutinative_mode: false
tekamolo:
priority: [temporal, lokal, kausal, modal]
require_fillable: true
markov:
radius: 2
kernel: gaussian
replay: forward
spo_causal:
pearl_mask: 0x01
ambiguity_tolerance: 0.05
coverage:
local_threshold: 0.95
escalate_below: 0.90
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/intuitive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Intuitive: leap to abduction, soft thresholds, agglutinative for surface tells.
style: intuitive
nars:
primary: Abduction
fallback: Synthesis
morphology:
tables: [english_svo, finnish_case_table, turkish_aggl]
agglutinative_mode: true
tekamolo:
priority: [modal, temporal, kausal, lokal]
require_fillable: false
markov:
radius: 4
kernel: gaussian
replay: forward
spo_causal:
pearl_mask: 0x0F
ambiguity_tolerance: 0.30
coverage:
local_threshold: 0.78
escalate_below: 0.60
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/metacognitive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Metacognitive: revision-primary, both-direction replay, mid-tolerance for self-check.
style: metacognitive
nars:
primary: Revision
fallback: Abduction
morphology:
tables: [english_svo, finnish_case_table, russian_case_table]
agglutinative_mode: false
tekamolo:
priority: [kausal, modal, temporal, lokal]
require_fillable: false
markov:
radius: 5
kernel: mexican_hat
replay: both_and_compare
spo_causal:
pearl_mask: 0x3F
ambiguity_tolerance: 0.25
coverage:
local_threshold: 0.80
escalate_below: 0.65
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/peripheral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Peripheral: scan the edges, low-radius mexican-hat catches outliers.
style: peripheral
nars:
primary: Abduction
fallback: Extrapolation
morphology:
tables: [english_svo, finnish_case_table, japanese_particles]
agglutinative_mode: true
tekamolo:
priority: [lokal, temporal, modal, kausal]
require_fillable: false
markov:
radius: 4
kernel: mexican_hat
replay: backward
spo_causal:
pearl_mask: 0x1F
ambiguity_tolerance: 0.35
coverage:
local_threshold: 0.72
escalate_below: 0.58
22 changes: 22 additions & 0 deletions crates/deepnsm/assets/grammar_styles/systematic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (starter prior — tune empirically)
# Systematic: methodical traversal, full TEKAMOLO, gaussian-weighted Markov.
style: systematic
nars:
primary: Deduction
fallback: Induction
morphology:
tables: [english_svo, finnish_case_table, german_case_table]
agglutinative_mode: false
tekamolo:
priority: [temporal, kausal, modal, lokal]
require_fillable: true
markov:
radius: 5
kernel: gaussian
replay: forward
spo_causal:
pearl_mask: 0x03
ambiguity_tolerance: 0.15
coverage:
local_threshold: 0.88
escalate_below: 0.82
9 changes: 9 additions & 0 deletions crates/deepnsm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ pub mod similarity;
pub mod spo;
pub mod vocabulary;

pub mod trajectory;
pub mod markov_bundle;

#[cfg(feature = "contract-ticket")]
pub mod ticket_emit;

#[cfg(feature = "grammar-triangle")]
pub mod triangle_bridge;

// ─── Re-exports ──────────────────────────────────────────────────────────────

pub use pipeline::DeepNsmEngine;
Expand Down
Loading
Loading