snapkitty
machine-learning
python
SNAPKITTYWEST commited on
Commit
2af8b7a
Β·
verified Β·
1 Parent(s): ce0d85d

Sync with GitHub, license metadata from LICENSE files, commercial license notice

Browse files

metadata license: None -> other (snapkitty-tri-license)
README: License section appended
README: GitHub source link added

Files changed (1) hide show
  1. README.md +148 -126
README.md CHANGED
@@ -1,126 +1,148 @@
1
- # PocketLearn
2
-
3
- **Symbolic cognitive architecture: XML + XSLT + ILP + ASP + FORTH. Zero Python.**
4
-
5
- Learn = build a visible theory.
6
-
7
- Neural net: `learn = adjust W -= lr * grad`. Knowledge disappears into numbers you can't read.
8
-
9
- This: `learn = build a visible theory.`
10
-
11
- ---
12
-
13
- ## What it does
14
-
15
- ```
16
- sample_corpus.txt
17
- |
18
- v
19
- corpus_tokens.xml (tokenizer β€” 69 tokens, 52 vocab)
20
- |
21
- v
22
- ontology.xml (seed concepts: stack_op, compiler_word, meta_word...)
23
- |
24
- +--[XSLT]----------> background.pl (Prolog co-occurrence facts)
25
- |
26
- +--[XSLT]----------> ontology_induction_generated.pl (ILP engine, GENERATED by XSLT)
27
- |
28
- v
29
- swipl learns rules:
30
- Induced: is_a(W, stack_op) :- cooccur(W, 'drop'). F1=0.60
31
- Propose: include should be is_a(stack_op) cnt=1
32
- |
33
- v
34
- ontology_induced.xml (updated ontology with induced members)
35
- |
36
- +------[XSLT]-+------[XSLT]--+
37
- | |
38
- v v
39
- ASP validation generated_corpus_induced.fth
40
- clingo rejects gforth runs the learned dictionary
41
- contradictions
42
- (dup = stack_op AND
43
- compiler_word -> UNSAT)
44
- ```
45
-
46
- **The meta-trick:** `ontology_to_induction.xslt` generates the Prolog ILP engine from `ontology.xml`. So the whole system is self-describing β€” XSLT generates Prolog that learns rules from XML co-occurrence stats.
47
-
48
- ---
49
-
50
- ## Run
51
-
52
- ```bash
53
- # Install (Mac)
54
- brew install libxslt swi-prolog clingo gforth
55
-
56
- # Install (Linux)
57
- sudo apt install -y xsltproc swi-prolog gringo gforth
58
-
59
- # Build β€” full pipeline
60
- make
61
-
62
- # Run the FORTH (pre-built, no deps needed)
63
- make demo-prebuilt
64
- ```
65
-
66
- ---
67
-
68
- ## What you get
69
-
70
- ```bash
71
- make
72
- # [3/7] ILP engine via XSLT
73
- # [4/7] ILP Induction
74
- # Induced: is_a(W, stack_op) :- cooccur(W, 'drop'). F1=0.60
75
- # Induced: is_a(W, compiler_word) :- cooccur(W, 'semicolon'). F1=0.75
76
- # Induced: is_a(W, learning_word) :- cooccur(W, 'statistical'). F1=0.80
77
- # Proposing: include should be is_a(stack_op) (cooccurs with 'drop')
78
- # Proposing: defined should be is_a(compiler_word) (cooccurs with 'semicolon')
79
- # Proposing: similarity should be is_a(learning_word)
80
- # [5/7] ASP: SATISFIABLE
81
- # [6/7] FORTH written
82
-
83
- make demo
84
- # PocketLearn FORTH β€” seed + ILP-induced vocab
85
- # vocab size: 18
86
- # Induced: include (by drop), defined (by semicolon), similarity (by statistical)
87
- ```
88
-
89
- ---
90
-
91
- ## Files
92
-
93
- | File | Role |
94
- |------|------|
95
- | `sample_corpus.txt` | Input text |
96
- | `corpus_tokens.xml` | Tokenized corpus (XML) |
97
- | `ontology.xml` | Seed concepts with members + co-occurrence strengths |
98
- | `ontology_induced.xml` | Output ontology with ILP-induced members |
99
- | `corpus_to_background.xslt` | XML β†’ Prolog co-occurrence facts |
100
- | `ontology_to_induction.xslt` | **Generates** the Prolog ILP engine from ontology.xml |
101
- | `ontology_to_asp.xslt` | XML β†’ ASP validation facts |
102
- | `corpus_to_forth.xslt` | XML β†’ FORTH dictionary |
103
- | `ontology_induction_generated.pl` | ILP engine (XSLT output) β€” run with swipl |
104
- | `generated_corpus_induced.fth` | Final FORTH (seed + induced) β€” run with gforth |
105
- | `ontology.asp` | ASP contradiction rules |
106
- | `Makefile` | Full pipeline |
107
-
108
- ---
109
-
110
- ## Why this instead of a transformer
111
-
112
- | | Transformer | PocketLearn |
113
- |--|--|--|
114
- | Inspectable | No β€” weights are numbers | Yes β€” open `ontology_induced.xml` |
115
- | Reproducible | No β€” depends on random seed | Yes β€” same XML = same FORTH, bit-for-bit |
116
- | Debuggable | No | Yes β€” stack blow β†’ trace to corpus_tokens.xml line β†’ XSLT template |
117
- | Hallucinates | Yes β€” `dup = delete` possible | No β€” ASP kills contradictions |
118
- | Learns deep semantics | Yes | No |
119
-
120
- It won't discover deep semantics. It will never hallucinate `dup = delete` because ASP kills it.
121
-
122
- ---
123
-
124
- **Ahmad Ali Parr Β· Bel Esprit D'Accord Irrevocable Trust Β· EIN 42-697643**
125
-
126
- `Omega = TRUST AND CODE`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: snapkitty-tri-license
4
+ license_link: https://huggingface.co/Snapkitty/pocketlearn/blob/main/LICENSE.tri
5
+ tags:
6
+ - snapkitty
7
+ ---
8
+
9
+ > Source: [github.com/SNAPKITTYWEST/pocketlearn](https://github.com/SNAPKITTYWEST/pocketlearn)
10
+
11
+ # PocketLearn
12
+
13
+ **Symbolic cognitive architecture: XML + XSLT + ILP + ASP + FORTH. Zero Python.**
14
+
15
+ Learn = build a visible theory.
16
+
17
+ Neural net: `learn = adjust W -= lr * grad`. Knowledge disappears into numbers you can't read.
18
+
19
+ This: `learn = build a visible theory.`
20
+
21
+ ---
22
+
23
+ ## What it does
24
+
25
+ ```
26
+ sample_corpus.txt
27
+ |
28
+ v
29
+ corpus_tokens.xml (tokenizer β€” 69 tokens, 52 vocab)
30
+ |
31
+ v
32
+ ontology.xml (seed concepts: stack_op, compiler_word, meta_word...)
33
+ |
34
+ +--[XSLT]----------> background.pl (Prolog co-occurrence facts)
35
+ |
36
+ +--[XSLT]----------> ontology_induction_generated.pl (ILP engine, GENERATED by XSLT)
37
+ |
38
+ v
39
+ swipl learns rules:
40
+ Induced: is_a(W, stack_op) :- cooccur(W, 'drop'). F1=0.60
41
+ Propose: include should be is_a(stack_op) cnt=1
42
+ |
43
+ v
44
+ ontology_induced.xml (updated ontology with induced members)
45
+ |
46
+ +------[XSLT]-+------[XSLT]--+
47
+ | |
48
+ v v
49
+ ASP validation generated_corpus_induced.fth
50
+ clingo rejects gforth runs the learned dictionary
51
+ contradictions
52
+ (dup = stack_op AND
53
+ compiler_word -> UNSAT)
54
+ ```
55
+
56
+ **The meta-trick:** `ontology_to_induction.xslt` generates the Prolog ILP engine from `ontology.xml`. So the whole system is self-describing β€” XSLT generates Prolog that learns rules from XML co-occurrence stats.
57
+
58
+ ---
59
+
60
+ ## Run
61
+
62
+ ```bash
63
+ # Install (Mac)
64
+ brew install libxslt swi-prolog clingo gforth
65
+
66
+ # Install (Linux)
67
+ sudo apt install -y xsltproc swi-prolog gringo gforth
68
+
69
+ # Build β€” full pipeline
70
+ make
71
+
72
+ # Run the FORTH (pre-built, no deps needed)
73
+ make demo-prebuilt
74
+ ```
75
+
76
+ ---
77
+
78
+ ## What you get
79
+
80
+ ```bash
81
+ make
82
+ # [3/7] ILP engine via XSLT
83
+ # [4/7] ILP Induction
84
+ # Induced: is_a(W, stack_op) :- cooccur(W, 'drop'). F1=0.60
85
+ # Induced: is_a(W, compiler_word) :- cooccur(W, 'semicolon'). F1=0.75
86
+ # Induced: is_a(W, learning_word) :- cooccur(W, 'statistical'). F1=0.80
87
+ # Proposing: include should be is_a(stack_op) (cooccurs with 'drop')
88
+ # Proposing: defined should be is_a(compiler_word) (cooccurs with 'semicolon')
89
+ # Proposing: similarity should be is_a(learning_word)
90
+ # [5/7] ASP: SATISFIABLE
91
+ # [6/7] FORTH written
92
+
93
+ make demo
94
+ # PocketLearn FORTH β€” seed + ILP-induced vocab
95
+ # vocab size: 18
96
+ # Induced: include (by drop), defined (by semicolon), similarity (by statistical)
97
+ ```
98
+
99
+ ---
100
+
101
+ ## Files
102
+
103
+ | File | Role |
104
+ |------|------|
105
+ | `sample_corpus.txt` | Input text |
106
+ | `corpus_tokens.xml` | Tokenized corpus (XML) |
107
+ | `ontology.xml` | Seed concepts with members + co-occurrence strengths |
108
+ | `ontology_induced.xml` | Output ontology with ILP-induced members |
109
+ | `corpus_to_background.xslt` | XML β†’ Prolog co-occurrence facts |
110
+ | `ontology_to_induction.xslt` | **Generates** the Prolog ILP engine from ontology.xml |
111
+ | `ontology_to_asp.xslt` | XML β†’ ASP validation facts |
112
+ | `corpus_to_forth.xslt` | XML β†’ FORTH dictionary |
113
+ | `ontology_induction_generated.pl` | ILP engine (XSLT output) β€” run with swipl |
114
+ | `generated_corpus_induced.fth` | Final FORTH (seed + induced) β€” run with gforth |
115
+ | `ontology.asp` | ASP contradiction rules |
116
+ | `Makefile` | Full pipeline |
117
+
118
+ ---
119
+
120
+ ## Why this instead of a transformer
121
+
122
+ | | Transformer | PocketLearn |
123
+ |--|--|--|
124
+ | Inspectable | No β€” weights are numbers | Yes β€” open `ontology_induced.xml` |
125
+ | Reproducible | No β€” depends on random seed | Yes β€” same XML = same FORTH, bit-for-bit |
126
+ | Debuggable | No | Yes β€” stack blow β†’ trace to corpus_tokens.xml line β†’ XSLT template |
127
+ | Hallucinates | Yes β€” `dup = delete` possible | No β€” ASP kills contradictions |
128
+ | Learns deep semantics | Yes | No |
129
+
130
+ It won't discover deep semantics. It will never hallucinate `dup = delete` because ASP kills it.
131
+
132
+ ---
133
+
134
+ **Ahmad Ali Parr Β· Bel Esprit D'Accord Irrevocable Trust Β· EIN 42-697643**
135
+
136
+ `Omega = TRUST AND CODE`
137
+
138
+ ---
139
+
140
+ ## License
141
+
142
+ Licensed under **SnapKitty Tri-License**. Full text: [LICENSE.tri](LICENSE.tri).
143
+
144
+ ### πŸ’Ό Commercial License
145
+
146
+ Snapkitty code is free and open under **AGPL-3.0** for open-source use. Building a commercial product or service? A **proprietary commercial license** from Snapkitty Collective LLC lets you ship this code without the AGPL's source-sharing and network-use obligations.
147
+
148
+ **[β†’ Get a commercial license](mailto:A.parr@belespritdaccord.uk?subject=Commercial%20license:%20pocketlearn)** Β· A.parr@belespritdaccord.uk