@polycode-projects/the-mechanical-code-talker 5.0.13 → 5.0.14
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/conceptnet/quality-filter.mjs +19 -2
- package/corpus/conceptnet/slice.jsonl +0 -120
- package/corpus/tier2/generate.mjs +13 -10
- package/corpus/tier2/human-large.jsonl +13 -10
- package/corpus/tier2/manifest.json +3 -3
- package/package.json +1 -1
- package/src/domain/digest/store-stats.mjs +2 -1
- package/src/domain/hub-terms.mjs +29 -0
- package/src/domain/persona/tiers.mjs +7 -14
- package/src/domain/sense-split.mjs +69 -4
- package/src/services/chat-page-viz.mjs +11 -4
- package/src/services/chat.mjs +472 -61
- package/src/services/finish.mjs +10 -1
- package/src/surfaces/web/memory-ask-browser.bundle.js +111 -111
|
@@ -34,9 +34,16 @@
|
|
|
34
34
|
// 7. opinion object — /r/IsA or /r/DefinedAs whose object is one of a
|
|
35
35
|
// small, evidence-based OPINION set (adjectives /
|
|
36
36
|
// value words that never name a class)
|
|
37
|
+
// 8. denied row — the exact (rel, start, end) triple is in a
|
|
38
|
+
// small, hand-curated DENIED_ROWS set: a claim
|
|
39
|
+
// read as demonstrably false in general English
|
|
40
|
+
// while reading the committed slice, too
|
|
41
|
+
// specific for any shape rule above to catch
|
|
42
|
+
// ("beta IsA programming_language")
|
|
37
43
|
//
|
|
38
|
-
// Rules 1-5 apply to every relation (they only ever remove junk); 6-7
|
|
39
|
-
// definitional band the sims flagged. Stats land on stderr; JSONL on
|
|
44
|
+
// Rules 1-5 and 8 apply to every relation (they only ever remove junk); 6-7
|
|
45
|
+
// are the definitional band the sims flagged. Stats land on stderr; JSONL on
|
|
46
|
+
// stdout.
|
|
40
47
|
|
|
41
48
|
import { readFile, writeFile } from "node:fs/promises";
|
|
42
49
|
import { createInterface } from "node:readline";
|
|
@@ -65,8 +72,18 @@ export const KNOWN_MISSPELLINGS = new Set([
|
|
|
65
72
|
"vessle",
|
|
66
73
|
]);
|
|
67
74
|
|
|
75
|
+
// Rows whose claim is demonstrably false in general English, found by reading
|
|
76
|
+
// the committed slice. Keyed `rel start end` so a row is cut only when all
|
|
77
|
+
// three match — a re-fetch that changes the object leaves the new row alone.
|
|
78
|
+
export const DENIED_ROWS = new Set([
|
|
79
|
+
"/r/IsA /c/en/beta /c/en/programming_language",
|
|
80
|
+
"/r/IsA /c/en/psi /c/en/software",
|
|
81
|
+
"/r/Antonym /c/en/letter /c/en/email",
|
|
82
|
+
]);
|
|
83
|
+
|
|
68
84
|
/** Why this row is noise, or null to keep it. Pure function of the row shape. */
|
|
69
85
|
export function cutReason(row) {
|
|
86
|
+
if (DENIED_ROWS.has(`${row.rel} ${row.start} ${row.end}`)) return "denied-row";
|
|
70
87
|
const s = bareTerm(row.start);
|
|
71
88
|
const e = bareTerm(row.end);
|
|
72
89
|
for (const t of [s, e]) {
|