eyeling 1.28.8 → 1.29.0
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/README.md +60 -1
- package/dist/browser/eyeling.browser.js +995 -49
- package/dist/browser/index.mjs +10 -0
- package/examples/complex-matrix-stability.n3 +23 -23
- package/examples/deep-taxonomy-10.n3 +2 -2
- package/examples/deep-taxonomy-100.n3 +2 -2
- package/examples/deep-taxonomy-1000.n3 +2 -2
- package/examples/deep-taxonomy-10000.n3 +2 -2
- package/eyeling.js +995 -49
- package/index.d.ts +59 -0
- package/index.js +17 -0
- package/lib/cli.js +102 -0
- package/lib/engine.js +120 -0
- package/lib/entry.js +4 -0
- package/lib/lexer.js +80 -49
- package/lib/rdfjs.js +1 -0
- package/lib/store.js +685 -0
- package/package.json +8 -3
- package/test/api.test.js +127 -1
- package/test/playground.test.js +17 -3
- package/test/store.test.js +138 -0
- package/tools/bundle.js +10 -0
package/dist/browser/index.mjs
CHANGED
|
@@ -12,6 +12,10 @@ function getBrowserApi() {
|
|
|
12
12
|
|
|
13
13
|
export const INFERENCE_FUSE_EXIT_CODE = 65;
|
|
14
14
|
|
|
15
|
+
export function runAsync(input, opts) {
|
|
16
|
+
return getBrowserApi().runAsync(input, opts);
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
export function reasonStream(input, opts) {
|
|
16
20
|
return getBrowserApi().reasonStream(input, opts);
|
|
17
21
|
}
|
|
@@ -20,6 +24,10 @@ export function reasonRdfJs(input, opts) {
|
|
|
20
24
|
return getBrowserApi().reasonRdfJs(input, opts);
|
|
21
25
|
}
|
|
22
26
|
|
|
27
|
+
export function createFactStore(options) {
|
|
28
|
+
return getBrowserApi().createFactStore(options);
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
export function registerBuiltin(iri, handler) {
|
|
24
32
|
return getBrowserApi().registerBuiltin(iri, handler);
|
|
25
33
|
}
|
|
@@ -67,9 +75,11 @@ const eyeling = {
|
|
|
67
75
|
return getBrowserApi().version;
|
|
68
76
|
},
|
|
69
77
|
INFERENCE_FUSE_EXIT_CODE,
|
|
78
|
+
runAsync,
|
|
70
79
|
reasonStream,
|
|
71
80
|
reasonRdfJs,
|
|
72
81
|
rdfjs,
|
|
82
|
+
createFactStore,
|
|
73
83
|
registerBuiltin,
|
|
74
84
|
unregisterBuiltin,
|
|
75
85
|
registerBuiltinModule,
|
|
@@ -253,38 +253,38 @@
|
|
|
253
253
|
:Check :c4 ?C4.
|
|
254
254
|
:Check :c5 ?C5.
|
|
255
255
|
(
|
|
256
|
-
"Complex Matrix Stability — ARC-style
|
|
256
|
+
"""Complex Matrix Stability — ARC-style
|
|
257
257
|
|
|
258
|
-
"
|
|
259
|
-
"## Answer
|
|
260
|
-
"
|
|
258
|
+
"""
|
|
259
|
+
"""## Answer
|
|
260
|
+
"""
|
|
261
261
|
"We compare three diagonal 2x2 complex matrices for discrete-time stability: "
|
|
262
262
|
"A_unstable = " ?MuS ", A_stable = " ?MsS ", and A_damped = " ?MdS ". "
|
|
263
263
|
"Their spectral radii are ρ(A_unstable) = " ?Ru ", ρ(A_stable) = " ?Rs ", and ρ(A_damped) = " ?Rd ". "
|
|
264
|
-
"So A_unstable is unstable, A_stable is marginally stable, and A_damped is damped.
|
|
264
|
+
"""So A_unstable is unstable, A_stable is marginally stable, and A_damped is damped.
|
|
265
265
|
|
|
266
|
-
"
|
|
267
|
-
"## Reason Why
|
|
268
|
-
"
|
|
266
|
+
"""
|
|
267
|
+
"""## Reason Why
|
|
268
|
+
"""
|
|
269
269
|
"For a discrete-time linear system x_{k+1} = A x_k, the eigenvalues of A govern the behaviour of the modes. "
|
|
270
270
|
"Because these matrices are diagonal, the eigenvalues are just the diagonal entries. "
|
|
271
271
|
"The spectral radius is the maximum modulus of the eigenvalues: if it is greater than 1 a mode grows, "
|
|
272
272
|
"if it equals 1 the modes remain bounded without decaying, and if it is less than 1 all modes decay to zero. "
|
|
273
|
-
"Here the diagonal entries give radii 2, 1, and 0 respectively, which explains the three classifications.
|
|
274
|
-
|
|
275
|
-
"
|
|
276
|
-
"## Check
|
|
277
|
-
"
|
|
278
|
-
"C1 " ?C1 "
|
|
279
|
-
"
|
|
280
|
-
"C2 " ?C2 "
|
|
281
|
-
"
|
|
282
|
-
"C3 " ?C3 "
|
|
283
|
-
"
|
|
284
|
-
"C4 " ?C4 "
|
|
285
|
-
"
|
|
286
|
-
"C5 " ?C5 "
|
|
287
|
-
"
|
|
273
|
+
"""Here the diagonal entries give radii 2, 1, and 0 respectively, which explains the three classifications.
|
|
274
|
+
|
|
275
|
+
"""
|
|
276
|
+
"""## Check
|
|
277
|
+
"""
|
|
278
|
+
"C1 " ?C1 """
|
|
279
|
+
"""
|
|
280
|
+
"C2 " ?C2 """
|
|
281
|
+
"""
|
|
282
|
+
"C3 " ?C3 """
|
|
283
|
+
"""
|
|
284
|
+
"C4 " ?C4 """
|
|
285
|
+
"""
|
|
286
|
+
"C5 " ?C5 """
|
|
287
|
+
"""
|
|
288
288
|
) string:concatenation ?Block. }
|
|
289
289
|
=>
|
|
290
290
|
{ :report log:outputString ?Block. } .
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
=>
|
|
61
61
|
{
|
|
62
|
-
:report log:outputString "Deep Taxonomy - deep classification benchmark
|
|
62
|
+
:report log:outputString """Deep Taxonomy - deep classification benchmark
|
|
63
63
|
|
|
64
64
|
## Answer
|
|
65
65
|
The test succeeds: starting from one individual classified as N0, the rules eventually classify it as N10 and then as A2.
|
|
@@ -74,5 +74,5 @@ C3 OK - the chain reaches the midpoint N5 and still carries both side-label bran
|
|
|
74
74
|
C4 OK - the final taxonomy step from N9 to N10 was completed.
|
|
75
75
|
C5 OK - once N10 is reached, the terminal class A2 is derived.
|
|
76
76
|
C6 OK - the success flag is raised only after the terminal class A2 is present.
|
|
77
|
-
" .
|
|
77
|
+
""" .
|
|
78
78
|
} .
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
}
|
|
150
150
|
=>
|
|
151
151
|
{
|
|
152
|
-
:report log:outputString "Deep Taxonomy - deep classification benchmark
|
|
152
|
+
:report log:outputString """Deep Taxonomy - deep classification benchmark
|
|
153
153
|
|
|
154
154
|
## Answer
|
|
155
155
|
The test succeeds: starting from one individual classified as N0, the rules eventually classify it as N100 and then as A2.
|
|
@@ -164,5 +164,5 @@ C3 OK - the chain reaches the midpoint N50 and still carries both side-label bra
|
|
|
164
164
|
C4 OK - the final taxonomy step from N99 to N100 was completed.
|
|
165
165
|
C5 OK - once N100 is reached, the terminal class A2 is derived.
|
|
166
166
|
C6 OK - the success flag is raised only after the terminal class A2 is present.
|
|
167
|
-
" .
|
|
167
|
+
""" .
|
|
168
168
|
} .
|
|
@@ -1049,7 +1049,7 @@
|
|
|
1049
1049
|
}
|
|
1050
1050
|
=>
|
|
1051
1051
|
{
|
|
1052
|
-
:report log:outputString "Deep Taxonomy - deep classification benchmark
|
|
1052
|
+
:report log:outputString """Deep Taxonomy - deep classification benchmark
|
|
1053
1053
|
|
|
1054
1054
|
## Answer
|
|
1055
1055
|
The test succeeds: starting from one individual classified as N0, the rules eventually classify it as N1000 and then as A2.
|
|
@@ -1064,5 +1064,5 @@ C3 OK - the chain reaches the midpoint N500 and still carries both side-label br
|
|
|
1064
1064
|
C4 OK - the final taxonomy step from N999 to N1000 was completed.
|
|
1065
1065
|
C5 OK - once N1000 is reached, the terminal class A2 is derived.
|
|
1066
1066
|
C6 OK - the success flag is raised only after the terminal class A2 is present.
|
|
1067
|
-
" .
|
|
1067
|
+
""" .
|
|
1068
1068
|
} .
|
|
@@ -10049,7 +10049,7 @@
|
|
|
10049
10049
|
}
|
|
10050
10050
|
=>
|
|
10051
10051
|
{
|
|
10052
|
-
:report log:outputString "Deep Taxonomy - deep classification benchmark
|
|
10052
|
+
:report log:outputString """Deep Taxonomy - deep classification benchmark
|
|
10053
10053
|
|
|
10054
10054
|
## Answer
|
|
10055
10055
|
The test succeeds: starting from one individual classified as N0, the rules eventually classify it as N10000 and then as A2.
|
|
@@ -10064,5 +10064,5 @@ C3 OK - the chain reaches the midpoint N5000 and still carries both side-label b
|
|
|
10064
10064
|
C4 OK - the final taxonomy step from N9999 to N10000 was completed.
|
|
10065
10065
|
C5 OK - once N10000 is reached, the terminal class A2 is derived.
|
|
10066
10066
|
C6 OK - the success flag is raised only after the terminal class A2 is present.
|
|
10067
|
-
" .
|
|
10067
|
+
""" .
|
|
10068
10068
|
} .
|