Spaces:
Running
Running
Update index.html
Browse files- index.html +2 -63
index.html
CHANGED
|
@@ -69,71 +69,11 @@
|
|
| 69 |
plugins = [
|
| 70 |
"https://pyscript.net/latest/plugins/python/py_tutor.py"
|
| 71 |
]
|
| 72 |
-
packages = ["pandas"
|
| 73 |
</py-config>
|
| 74 |
|
| 75 |
<section class="pyscript">
|
| 76 |
<py-script>
|
| 77 |
-
await micropip.install("setuptools")
|
| 78 |
-
import pyactr as actr
|
| 79 |
-
actr.chunktype("word", "form, meaning, category, number, synfunction")
|
| 80 |
-
actr.chunktype("goal_lexeme", "task, category, number")
|
| 81 |
-
|
| 82 |
-
carLexeme = actr.chunkstring(string="""
|
| 83 |
-
isa word
|
| 84 |
-
form car
|
| 85 |
-
meaning '[[car]]'
|
| 86 |
-
category noun
|
| 87 |
-
number sg
|
| 88 |
-
synfunction subject
|
| 89 |
-
""")
|
| 90 |
-
|
| 91 |
-
agreement = actr.ACTRModel()
|
| 92 |
-
dm = agreement.decmem
|
| 93 |
-
dm.add(carLexeme)
|
| 94 |
-
agreement.productionstring(name="retrieve", string="""
|
| 95 |
-
=g>
|
| 96 |
-
isa goal_lexeme
|
| 97 |
-
category verb
|
| 98 |
-
task agree
|
| 99 |
-
?retrieval>
|
| 100 |
-
buffer empty
|
| 101 |
-
==>
|
| 102 |
-
=g>
|
| 103 |
-
isa goal_lexeme
|
| 104 |
-
task trigger_agreement
|
| 105 |
-
category verb
|
| 106 |
-
+retrieval>
|
| 107 |
-
isa word
|
| 108 |
-
category noun
|
| 109 |
-
synfunction subject
|
| 110 |
-
""")
|
| 111 |
-
|
| 112 |
-
agreement.productionstring(name="agree", string="""
|
| 113 |
-
=g>
|
| 114 |
-
isa goal_lexeme
|
| 115 |
-
task trigger_agreement
|
| 116 |
-
category verb
|
| 117 |
-
=retrieval>
|
| 118 |
-
isa word
|
| 119 |
-
category noun
|
| 120 |
-
synfunction subject
|
| 121 |
-
number =x
|
| 122 |
-
==>
|
| 123 |
-
=g>
|
| 124 |
-
isa goal_lexeme
|
| 125 |
-
category verb
|
| 126 |
-
number =x
|
| 127 |
-
task done
|
| 128 |
-
""")
|
| 129 |
-
|
| 130 |
-
agreement.productionstring(name="done", string="""
|
| 131 |
-
=g>
|
| 132 |
-
isa goal_lexeme
|
| 133 |
-
task done
|
| 134 |
-
==>
|
| 135 |
-
~g>
|
| 136 |
-
""")
|
| 137 |
import pandas as pd
|
| 138 |
from pyodide.http import open_url
|
| 139 |
import sys
|
|
@@ -181,8 +121,7 @@
|
|
| 181 |
|
| 182 |
def log(message):
|
| 183 |
# log to pyscript dev console
|
| 184 |
-
print (
|
| 185 |
-
message1="aso"
|
| 186 |
|
| 187 |
# log to JS console
|
| 188 |
js.console.log (message)
|
|
|
|
| 69 |
plugins = [
|
| 70 |
"https://pyscript.net/latest/plugins/python/py_tutor.py"
|
| 71 |
]
|
| 72 |
+
packages = ["pandas"]
|
| 73 |
</py-config>
|
| 74 |
|
| 75 |
<section class="pyscript">
|
| 76 |
<py-script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
import pandas as pd
|
| 78 |
from pyodide.http import open_url
|
| 79 |
import sys
|
|
|
|
| 121 |
|
| 122 |
def log(message):
|
| 123 |
# log to pyscript dev console
|
| 124 |
+
print (message)
|
|
|
|
| 125 |
|
| 126 |
# log to JS console
|
| 127 |
js.console.log (message)
|