tpmkms_4wp 9.4.3 → 9.4.4-beta.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.
@@ -0,0 +1,72 @@
1
+ const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
+ const { defaultContextCheck } = require('./helpers')
3
+ const gdefaults = require("./gdefaults")
4
+ const latin_tests = require('./latin.test.json')
5
+
6
+ /*
7
+ marcus est vir
8
+ marcus vir est
9
+
10
+ estne
11
+ marcus quintus iuliaque
12
+ */
13
+ const config = {
14
+ name: 'latin',
15
+ operators: [
16
+ "((*) [queryMarker])",
17
+ "([hierarchiable])",
18
+ "((hierarchiable) [hierarchy|] (hierarchiable))",
19
+ "((hierarchiable) (hierarchiable) [hierarchy|])",
20
+ "([hierarchy|] (hierarchiable) (hierarchiable))",
21
+ ],
22
+ bridges: [
23
+ {
24
+ id: "queryMarker",
25
+ bridge: "{ ...next(before[0]), question: true }",
26
+ before: ['hierarchy'],
27
+ },
28
+ { id: "hierarchiable" },
29
+ {
30
+ id: "hierarchy",
31
+ localHierarchy: [['unknown', 'hierarchiable']],
32
+ bridge: "{ ...next(operator), child: arguments[0], parent: arguments[1], question: less_than(indexes.operator, indexes.arguments[0]), interpolate: all }",
33
+ words: [
34
+ { word: 'sum', number: 'singular', person: 'first' },
35
+ { word: 'es', number: 'singular', person: 'second' },
36
+ { word: 'est', number: 'singular', person: 'third' },
37
+ { word: 'sumus', number: 'plural', person: 'first' },
38
+ { word: 'estis', number: 'plural', person: 'second' },
39
+ { word: 'sunt', number: 'plural', person: 'third' },
40
+ ]
41
+ },
42
+ ],
43
+ words: {
44
+ literals: {
45
+ "ne": [{ id: 'queryMarker', initial: { value: 'queryMarker' } }],
46
+ },
47
+ patterns: [
48
+ { "pattern": ["ne"], defs: [
49
+ {
50
+ id: "queryMarker",
51
+ uuid: '1',
52
+ initial: { value: 'greg' }
53
+ }
54
+ ]},
55
+ ],
56
+ },
57
+ };
58
+
59
+ knowledgeModule( {
60
+ config,
61
+ includes: [gdefaults],
62
+
63
+ module,
64
+ description: 'latin',
65
+ test: {
66
+ name: './latin.test.json',
67
+ contents: latin_tests,
68
+ checks: {
69
+ context: [defaultContextCheck()],
70
+ },
71
+ },
72
+ })