@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.
@@ -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 are the
39
- // definitional band the sims flagged. Stats land on stderr; JSONL on stdout.
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]) {