durable_rules_magic
Magic to simplify working with durable.rules in educational contexts, initially when working with "subject, predicate, object" triple style reasoning.
Install as:
pip install --upgrade git+https://github.com/innovationOUtside/durable_rules_magic.git
See the demo.ipynb for usage.
Additional Notes
If we define:
from IPython.display import Javascript
class Speech():
def say(self, txt):
display(Javascript(f'speechSynthesis.speak(new SpeechSynthesisUtterance("{txt}"))'))
then we can get Python to speak...
For example:
speaker = Speech()
speaker.say('hello')
This means we can hear the reasoning using rules of the form:
@when_all(Subject('eats', 'worms'))
def bird(c):
speaker.say(f'if {c.m.subject} eats worms')
Set(c, '? : is : bird')
speaker.say(f'{c.m.subject} is a bird')
which would make the rules both accessible and easier to follow.
Could we perhaps create a decorator to the rules that would provide such spoken annotations?
Metadata
Release files for durable-rules-tools 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| durable_rules_tools-0.0.1.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| durable_rules_tools-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / durable_rules_tools-0.0.1.tar.gz
| Download URL | durable_rules_tools-0.0.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
318090346d568955f383634ab2dcc475ff67aa4e773c4ed400f9249facba4a63
|
|
BLAKE2b-256 checksum How to use checksums |
c855dbb9f632dd505d3c6b9f269d025881f4950f107127af784040d689207d3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
|
Release files / durable_rules_tools-0.0.1-py3-none-any.whl
| Download URL | durable_rules_tools-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a62f97c9d020f628bf5d6ff9a4d91f4bbb35c05d1b9401239020e627d0147144
|
|
BLAKE2b-256 checksum How to use checksums |
dc2219900efbae7c8e4bb9c9106e9a09cb698483483173f9e2ba2bf01e579660
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
|