@polycode-projects/the-mechanical-code-talker 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/LICENSES.json +19 -4
- package/corpus/README.md +48 -0
- package/corpus/generated/README.md +24 -9
- package/corpus/generated/ace-surface-variants.jsonl +4 -1
- package/corpus/generated/manifest.json +4 -4
- package/corpus/prose/manifest.json +512 -0
- package/corpus/prose/sqlite/LICENSE-NOTICE +53 -0
- package/corpus/prose/sqlite/arch.txt +213 -0
- package/corpus/prose/sqlite/atomiccommit.txt +1117 -0
- package/corpus/prose/sqlite/faq.txt +473 -0
- package/corpus/prose/sqlite/fileformat.txt +1589 -0
- package/corpus/prose/sqlite/lang_createtable.txt +1339 -0
- package/corpus/prose/sqlite/lang_insert.txt +580 -0
- package/corpus/prose/sqlite/lang_select.txt +3293 -0
- package/corpus/prose/sqlite/optoverview.txt +908 -0
- package/corpus/prose/sqlite/queryplanner.txt +447 -0
- package/corpus/prose/sqlite/transactional.txt +41 -0
- package/corpus/prose/sqlite/wal.txt +567 -0
- package/corpus/prose/sqlite/whentouse.txt +300 -0
- package/corpus/prose/wikipedia/Apple.txt +4 -0
- package/corpus/prose/wikipedia/Attempto_Controlled_English.txt +169 -0
- package/corpus/prose/wikipedia/Automated_planning_and_scheduling.txt +67 -0
- package/corpus/prose/wikipedia/Bee.txt +7 -0
- package/corpus/prose/wikipedia/Bird.txt +8 -0
- package/corpus/prose/wikipedia/Bone.txt +4 -0
- package/corpus/prose/wikipedia/Book.txt +7 -0
- package/corpus/prose/wikipedia/Bread.txt +6 -0
- package/corpus/prose/wikipedia/Butterfly.txt +6 -0
- package/corpus/prose/wikipedia/Car.txt +1 -0
- package/corpus/prose/wikipedia/Cat.txt +1 -0
- package/corpus/prose/wikipedia/Child.txt +3 -0
- package/corpus/prose/wikipedia/City.txt +2 -0
- package/corpus/prose/wikipedia/Clock.txt +2 -0
- package/corpus/prose/wikipedia/Cooking.txt +1 -0
- package/corpus/prose/wikipedia/Description_logic.txt +660 -0
- package/corpus/prose/wikipedia/Doctor.txt +6 -0
- package/corpus/prose/wikipedia/Dog.txt +4 -0
- package/corpus/prose/wikipedia/Eagle.txt +4 -0
- package/corpus/prose/wikipedia/Emotion.txt +9 -0
- package/corpus/prose/wikipedia/Eye.txt +5 -0
- package/corpus/prose/wikipedia/Family.txt +3 -0
- package/corpus/prose/wikipedia/Farm.txt +4 -0
- package/corpus/prose/wikipedia/Fear.txt +4 -0
- package/corpus/prose/wikipedia/First-order_logic.txt +1518 -0
- package/corpus/prose/wikipedia/Fish.txt +10 -0
- package/corpus/prose/wikipedia/Flower.txt +3 -0
- package/corpus/prose/wikipedia/Food.txt +10 -0
- package/corpus/prose/wikipedia/Grass.txt +9 -0
- package/corpus/prose/wikipedia/Hand.txt +2 -0
- package/corpus/prose/wikipedia/Happiness.txt +3 -0
- package/corpus/prose/wikipedia/Heart.txt +4 -0
- package/corpus/prose/wikipedia/Horse.txt +4 -0
- package/corpus/prose/wikipedia/House.txt +6 -0
- package/corpus/prose/wikipedia/Human.txt +4 -0
- package/corpus/prose/wikipedia/Insect.txt +6 -0
- package/corpus/prose/wikipedia/Interactive_fiction.txt +112 -0
- package/corpus/prose/wikipedia/Knowledge.txt +5 -0
- package/corpus/prose/wikipedia/Knowledge_representation_and_reasoning.txt +87 -0
- package/corpus/prose/wikipedia/LICENSE-NOTICE +94 -0
- package/corpus/prose/wikipedia/Language.txt +10 -0
- package/corpus/prose/wikipedia/Learning.txt +4 -0
- package/corpus/prose/wikipedia/Mammal.txt +3 -0
- package/corpus/prose/wikipedia/Memory.txt +5 -0
- package/corpus/prose/wikipedia/Milk.txt +1 -0
- package/corpus/prose/wikipedia/Mountain.txt +1 -0
- package/corpus/prose/wikipedia/Natural_language_processing.txt +211 -0
- package/corpus/prose/wikipedia/Ostrich.txt +2 -0
- package/corpus/prose/wikipedia/Owl.txt +2 -0
- package/corpus/prose/wikipedia/Penguin.txt +2 -0
- package/corpus/prose/wikipedia/Plant.txt +5 -0
- package/corpus/prose/wikipedia/Rain.txt +1 -0
- package/corpus/prose/wikipedia/Resource_Description_Framework.txt +184 -0
- package/corpus/prose/wikipedia/River.txt +1 -0
- package/corpus/prose/wikipedia/School.txt +8 -0
- package/corpus/prose/wikipedia/Sea.txt +1 -0
- package/corpus/prose/wikipedia/Semantic_Web.txt +114 -0
- package/corpus/prose/wikipedia/Semantic_reasoner.txt +29 -0
- package/corpus/prose/wikipedia/Snow.txt +5 -0
- package/corpus/prose/wikipedia/Sun.txt +5 -0
- package/corpus/prose/wikipedia/Teacher.txt +4 -0
- package/corpus/prose/wikipedia/Team.txt +3 -0
- package/corpus/prose/wikipedia/Text-based_game.txt +17 -0
- package/corpus/prose/wikipedia/Tool.txt +4 -0
- package/corpus/prose/wikipedia/Tree.txt +7 -0
- package/corpus/prose/wikipedia/Weather.txt +4 -0
- package/corpus/prose/wikipedia/Web_Ontology_Language.txt +133 -0
- package/corpus/prose/wikipedia/Wind.txt +8 -0
- package/corpus/prose/wikipedia/Writing.txt +5 -0
- package/package.json +2 -1
package/corpus/LICENSES.json
CHANGED
|
@@ -101,11 +101,26 @@
|
|
|
101
101
|
"notice": "corpus/tier2/manifest.json"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
|
-
"path": "corpus/
|
|
105
|
-
"upstream": "
|
|
106
|
-
"license": "
|
|
104
|
+
"path": "corpus/prose/sqlite/",
|
|
105
|
+
"upstream": "SQLite documentation (sqlite.org), plain-text extractions of 12 pages",
|
|
106
|
+
"license": "public-domain",
|
|
107
107
|
"shareAlike": false,
|
|
108
|
-
"notice": "corpus/
|
|
108
|
+
"notice": "corpus/prose/sqlite/LICENSE-NOTICE"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"path": "corpus/prose/wikipedia/",
|
|
112
|
+
"upstream": "Wikipedia — simple.wikipedia.org lead sections (56 everyday-concept articles) and en.wikipedia.org full articles (12 in tmct's technical domain), fetched via the MediaWiki extracts API",
|
|
113
|
+
"license": "CC-BY-SA-4.0",
|
|
114
|
+
"shareAlike": true,
|
|
115
|
+
"notice": "corpus/prose/wikipedia/LICENSE-NOTICE"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"path": "corpus/generated/ace-surface-variants.jsonl",
|
|
119
|
+
"upstream": "mechanically generated from Open English WordNet / SemCor example sentences (CC-BY-4.0) and corpus/prose/, which includes CC-BY-SA-4.0 Wikipedia text",
|
|
120
|
+
"license": "CC-BY-SA-4.0",
|
|
121
|
+
"shareAlike": true,
|
|
122
|
+
"notice": "corpus/generated/manifest.json",
|
|
123
|
+
"note": "CC-BY-SA-4.0, not CC-BY-4.0: the rescue rows quote and word-substitute Wikipedia sentences from corpus/prose/wikipedia/, so this published file is a modified derivative of CC-BY-SA-4.0 text and inherits its viral share-alike. It carried CC-BY-4.0 while the prose corpus was this repository's own docs; adding Wikipedia is what changed it. See corpus/prose/wikipedia/LICENSE-NOTICE."
|
|
109
124
|
},
|
|
110
125
|
{
|
|
111
126
|
"path": "data/",
|
package/corpus/README.md
CHANGED
|
@@ -45,6 +45,9 @@ notice}), guarded by `test/estate/corpus-licences.test.mjs`.
|
|
|
45
45
|
| `tier2/{aws,python,java,general}.jsonl` | tier-2 SAMPLE corpuses — same fact shape as the tier-1 slice, loadable via the same path (`general` is the one deliberately non-code-domain bundle) | ~4-6 KB each | MPL-2.0 |
|
|
46
46
|
| `tier2/human.jsonl` | the DEFAULT active bundle: the everyday "human-world" persona, Small tier (664 facts) — hand-curated from Open English WordNet, bridged to Schema.org's top-level classes | ~80 KB | MPL-2.0 (hand-authored fact set; not a verbatim WordNet/Schema.org excerpt — see `tier2/generate.mjs`'s own header comment) |
|
|
47
47
|
| `tier2/human-medium.jsonl` / `tier2/human-large.jsonl` | SIZE tiers of the SAME `human` bundle — each holds ONLY the facts that size adds beyond the previous one; both shipped INACTIVE by default, activated via `tmct init --persona-size medium\|large`. Built by `scripts/build-persona-tiers.mjs` from the same WordNet source, automatically curated (sense-ranked, blocklist/denylist-filtered) rather than hand-typed one at a time, given the scale (944 / ~12,000 facts) | ~111 KB / ~1.4 MB | MPL-2.0 (same "hand-authored in homage to the source's shape" basis as `human.jsonl`) |
|
|
48
|
+
| `prose/sqlite/*.txt` | the frozen prose corpus, code half: plain-text extractions of 12 SQLite documentation pages | ~375 KB | **public domain** (see `prose/sqlite/LICENSE-NOTICE`) |
|
|
49
|
+
| `prose/wikipedia/*.txt` | the frozen prose corpus, English half: 56 simple-English lead sections (everyday concepts) + 12 en.wikipedia full articles (NLP/OWL/logic) | ~356 KB | **CC-BY-SA 4.0** (see `prose/wikipedia/LICENSE-NOTICE`) |
|
|
50
|
+
| `prose/manifest.json` | provenance for the above: source URL, byte count and sha256 per file, plus the fetch date | — | MPL-2.0 |
|
|
48
51
|
| `tier2/human-examples.jsonl` / `tier2/human-examples-medium.jsonl` / `tier2/human-examples-large.jsonl` | the example-sentence corpus — real natural-language sentences mapped to the same curated vocabulary, NOT fact triples. Small/Medium tiers are 100% WordNet's own inline `example:` field (same CC-BY-4.0 basis as the fact bundles). Large tier ALSO includes a SemCor-filtered supplement (real Brown Corpus text, re-tagged to modern OEWN senses) for categories where WordNet's own inline coverage is thin (`human-nature` especially — `noun.animal.yaml`'s inline rate is under 1%) | ~11 KB / ~43 KB / ~257 KB | **The WordNet-inline entries**: CC-BY-4.0 (Princeton WordNet + Open English WordNet team), reproduced verbatim (these ARE the source's own example sentences, not a paraphrase). **The `source: "semcor:…"` entries**: CC-BY-4.0 per this SemCor fork's own `LICENSE.md` (a local uncommitted checkout of `globalwordnet/semcor`, real Brown Corpus text re-tagged to modern senses — the original 1960s Brown Corpus permissions aren't independently re-verified beyond that fork's own license statement; proceeding with attribution was an explicit operator decision) — each entry's own `source` field names its origin file (`semcor:<genre>/<file>.yaml`) for exactly this reason |
|
|
49
52
|
|
|
50
53
|
And alongside (same phase, different directory because it is tmct-original
|
|
@@ -55,6 +58,51 @@ data, not a derived corpus):
|
|
|
55
58
|
| `../data/templates/responses.jsonl` | ~56 response templates ({id, class, template, register}) | MPL-2.0 |
|
|
56
59
|
| `../data/phrasebook/software-phrases.txt` | ~170 SE phrase patterns + 31 synonym families | MPL-2.0 |
|
|
57
60
|
|
|
61
|
+
## The prose corpus (`prose/`) — external and frozen, on purpose
|
|
62
|
+
|
|
63
|
+
`prose/` is plain English text. It is not seeded and holds no facts. It exists
|
|
64
|
+
to be *measured against*: `scripts/template-coverage.mjs` asks how much of it
|
|
65
|
+
tmct's ACE grammar parses, and the rescue pass in
|
|
66
|
+
`scripts/generate-template-variants.mjs` mines it for near-misses.
|
|
67
|
+
|
|
68
|
+
It used to be this repository's own root `*.md` docs, and both reasons it moved
|
|
69
|
+
are worth stating, because both were real bugs:
|
|
70
|
+
|
|
71
|
+
- **A doc edit could drift a shipped artifact.** The corpus was globbed from
|
|
72
|
+
every root `*.md`, so editing a README or a plan changed
|
|
73
|
+
`generated/ace-surface-variants.jsonl` — a file npm ships. A rescue row could
|
|
74
|
+
be, and once was, a sentence someone had written into a plan that morning.
|
|
75
|
+
Committed text fetched from a recorded URL cannot do that.
|
|
76
|
+
- **The coverage metric was not comparable across versions.** A hit rate only
|
|
77
|
+
means something against a fixed corpus. When the corpus moves with every doc
|
|
78
|
+
edit, two versions' numbers are not measuring the same thing, and a change in
|
|
79
|
+
the number says nothing about a change in the grammar.
|
|
80
|
+
|
|
81
|
+
So the corpus is external (nothing in this repo can edit it), frozen (a
|
|
82
|
+
snapshot, checksummed per file in `prose/manifest.json`), and re-fetched only
|
|
83
|
+
when someone deliberately runs `npm run gen:prose-corpus`. `test/estate/prose-corpus.test.mjs`
|
|
84
|
+
checks the committed bytes against the manifest, so a hand-edit fails loudly.
|
|
85
|
+
|
|
86
|
+
**Licensing picked the sources, not preference.** The rescue pass substitutes
|
|
87
|
+
words and commits the result to a file npm publishes, so this corpus is
|
|
88
|
+
republished as a *modified derivative*. Only sources that permit derivatives
|
|
89
|
+
qualify. IETF RFCs and W3C specifications — including the OWL 2 Primer, the
|
|
90
|
+
best domain match there is — permit redistribution but **not** modification, so
|
|
91
|
+
they are unusable here and must not be added. SQLite's documentation is public
|
|
92
|
+
domain; Wikipedia is CC BY-SA 4.0. Adding Wikipedia is what makes
|
|
93
|
+
`generated/ace-surface-variants.jsonl` CC-BY-SA-4.0 rather than CC-BY-4.0:
|
|
94
|
+
share-alike is viral, and it reaches the generated file.
|
|
95
|
+
|
|
96
|
+
**Why simple-English lead sections for the everyday half.** Measured, on the
|
|
97
|
+
metric the rescue pass actually consumes (sentences with exactly one undeclared
|
|
98
|
+
word): simple.wikipedia.org lead sections yield ~0.33 rescue candidates per KB
|
|
99
|
+
against ~0.12 for technical prose. Lead sections are dense definitional English
|
|
100
|
+
("A penguin is a bird that cannot fly"), which is the shape the ACE grammar was
|
|
101
|
+
built to parse; later article sections drift into history and citations. The
|
|
102
|
+
titles cover the same everyday concepts the persona clumps model
|
|
103
|
+
(`scripts/build-persona-tiers.mjs`'s `CLUMP_FILES`). The technical half stays
|
|
104
|
+
because tmct's own domain is code.
|
|
105
|
+
|
|
58
106
|
## How seeding works
|
|
59
107
|
|
|
60
108
|
`src/adapters/corpus/conceptnet.mjs` turns the slice into tmct memory facts:
|
|
@@ -17,7 +17,7 @@ measurement: `node scripts/template-coverage.mjs` (baseline) and
|
|
|
17
17
|
|
|
18
18
|
| `kind` | What | Fields |
|
|
19
19
|
|---|---|---|
|
|
20
|
-
| `rescue` | A real
|
|
20
|
+
| `rescue` | A real sentence from the frozen prose corpus (`corpus/prose/`) that almost fit the ACE grammar (exactly one undeclared word), rescued by substituting a WordNet synonym of that word that's ALSO already declared in `src/domain/grammar/lexicon-core.json` | `sentence`, `rescued`, `from`, `to`, `pos`, `synsetId`, `sourceFile` |
|
|
21
21
|
| `variant` | A real WordNet/SemCor example sentence (`corpus/tier2/human-examples*.jsonl`) that already hits `parseAce`, with one content word swapped for a same-synset sibling (both ends independently declared in tmct's own lexicon) | `seed`, `generated`, `from`, `to`, `pos`, `synsetId`, `sourceCorpus` |
|
|
22
22
|
| `alt-phrasing` | A possessive-pattern (#7) hit rewritten in the ACE grammar's OTHER declared surface form for the same triple (`"X's Y is Z"` <-> `"the Y of X is Z"`, both routed through `buildPossessive` in `src/domain/grammar/ace.mjs`) | `seed`, `generated`, `pattern`, `form` |
|
|
23
23
|
|
|
@@ -31,12 +31,27 @@ product code — it is committed raw material, verified by
|
|
|
31
31
|
`scripts/template-coverage.mjs`. Wiring it into live answer rendering is a
|
|
32
32
|
separate, future phase.
|
|
33
33
|
|
|
34
|
-
## Licence
|
|
34
|
+
## Licence — CC-BY-SA-4.0
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
**`ace-surface-variants.jsonl` is CC-BY-SA-4.0**, and this file ships in the npm
|
|
37
|
+
package. It is not under this repository's MPL-2.0.
|
|
38
|
+
|
|
39
|
+
Two source licences meet in this file:
|
|
40
|
+
|
|
41
|
+
- Open English WordNet content (synset `members`/`example` fields) is CC-BY-4.0;
|
|
42
|
+
SemCor-derived sentences (`corpus/tier2/human-examples-large.jsonl`) are
|
|
43
|
+
CC-BY-4.0 per that fork's own `LICENSE.md` (the same basis `corpus/README.md`
|
|
44
|
+
already documents for that file). `variant` and `alt-phrasing` rows derive
|
|
45
|
+
from this material.
|
|
46
|
+
- `corpus/prose/` feeds the `rescue` rows, and it includes Wikipedia text under
|
|
47
|
+
**CC-BY-SA-4.0** (`corpus/prose/wikipedia/LICENSE-NOTICE`). A `rescue` row
|
|
48
|
+
quotes such a sentence and substitutes one word into it, so the row is a
|
|
49
|
+
published, modified derivative of CC-BY-SA-4.0 text.
|
|
50
|
+
|
|
51
|
+
Share-alike is viral, so the combined file takes the stricter licence:
|
|
52
|
+
**CC-BY-SA-4.0**. Redistributing it, modified or not, means doing so under
|
|
53
|
+
CC-BY-SA 4.0 with the attribution in `corpus/prose/wikipedia/LICENSE-NOTICE`.
|
|
54
|
+
|
|
55
|
+
This file was labelled CC-BY-4.0 while the rescue corpus was this repository's
|
|
56
|
+
own MPL-2.0 docs. Repointing the corpus at Wikipedia is what changed it.
|
|
57
|
+
`corpus/prose/sqlite/` is public domain and adds no condition of its own.
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
{"kind":"rescue","sentence":"
|
|
1
|
+
{"kind":"rescue","sentence":"The claim of the previous paragraph is extensively checked in the SQLite regression test suite using a special test harness that simulates the effects on a database file of operating system crashes and power failures","rescued":"The claim of the old paragraph is extensively checked in the SQLite regression test suite using a special test harness that simulates the effects on a database file of operating system crashes and power failures","from":"previous","to":"old","pos":"adjective","synsetId":"00128009-s","sourceFile":"sqlite/transactional.txt","provenance":"wordnet:00128009-s"}
|
|
2
|
+
{"kind":"rescue","sentence":"The meaning of sentences is described as a small set of interpretation rules","rescued":"The significance of sentences is described as a small set of interpretation rules","from":"meaning","to":"significance","pos":"noun","synsetId":"06613680-n","sourceFile":"wikipedia/Attempto_Controlled_English.txt","provenance":"wordnet:06613680-n"}
|
|
3
|
+
{"kind":"rescue","sentence":"The difficulty of planning is dependent on the simplifying assumptions employed","rescued":"The trouble of planning is dependent on the simplifying assumptions employed","from":"difficulty","to":"trouble","pos":"noun","synsetId":"00625102-n","sourceFile":"wikipedia/Automated_planning_and_scheduling.txt","provenance":"wordnet:00625102-n"}
|
|
4
|
+
{"kind":"rescue","sentence":"The consumption of food is normally enjoyable to humans","rescued":"The intake of food is normally enjoyable to humans","from":"consumption","to":"intake","pos":"noun","synsetId":"00839759-n","sourceFile":"wikipedia/Food.txt","provenance":"wordnet:00839759-n"}
|
|
2
5
|
{"kind":"variant","seed":"the ace of trumps is a sure winner","generated":"the one of trumps is a sure winner","from":"ace","to":"one","pos":"noun","synsetId":"13764713-n","sourceCorpus":"corpus/tier2/human-examples-large.jsonl","provenance":"wordnet:13764713-n"}
|
|
3
6
|
{"kind":"variant","seed":"the ace of trumps is a sure winner","generated":"the single of trumps is a sure winner","from":"ace","to":"single","pos":"noun","synsetId":"13764713-n","sourceCorpus":"corpus/tier2/human-examples-large.jsonl","provenance":"wordnet:13764713-n"}
|
|
4
7
|
{"kind":"variant","seed":"the ace of trumps is a sure winner","generated":"the unity of trumps is a sure winner","from":"ace","to":"unity","pos":"noun","synsetId":"13764713-n","sourceCorpus":"corpus/tier2/human-examples-large.jsonl","provenance":"wordnet:13764713-n"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"generated": "by scripts/generate-template-variants.mjs",
|
|
4
4
|
"file": "ace-surface-variants.jsonl",
|
|
5
|
-
"rows":
|
|
6
|
-
"bytes":
|
|
7
|
-
"sha256": "
|
|
8
|
-
"license": "CC-BY-4.0 (WordNet-derived synonym substitutions of Open English WordNet / SemCor example sentences and
|
|
5
|
+
"rows": 21,
|
|
6
|
+
"bytes": 6417,
|
|
7
|
+
"sha256": "6e1daca10e43455608e5ee91ca41e20c5a1c5b0127f14ffd087c85580fe1f0ad",
|
|
8
|
+
"license": "CC-BY-SA-4.0 (WordNet-derived synonym substitutions of Open English WordNet / SemCor example sentences (CC-BY-4.0) and corpus/prose/, which includes CC-BY-SA-4.0 Wikipedia text. Share-alike is viral and the rescue rows quote and modify that text, so the combined file is CC-BY-SA-4.0 — the stricter of the two. See corpus/prose/wikipedia/LICENSE-NOTICE and corpus/generated/README.md)"
|
|
9
9
|
}
|