oracle7 / workbench /converse /__init__.py
psiloceyeben's picture
Release 12.0 (full): one browser harness that converses, writes from held sources and builds what you describe, keeping each request through corrections and restarts. No language model. (part 4)
04e89f2 verified
Raw History Blame Contribute Delete
1.87 kB
"""converse - 11.5: the turn loop inside the head's own chat (constitution art. 4: one front door).
The head answers first. Where it declines, or where what it has is a lecture rather than an answer, the turn is read into
forms (turn_kernel: K8 + the forms grown from the dialogue corpus), the nearest scenes are found by role-aware resonance on
the seed algebra (resonance.py), and the reply is the scene's next move with its places bound and proved (compose_reply_v9),
cited to the record it came from. An open place is a question back to the user (the named hole). No language model.
Everything here was measured first in release115/PREREG_CONVERSATION.md.
This package carries its own data (data/): the move index, the scenes, the induced forms, the scene programs and the
dialogue acts it was measured on. Paths are set here so the modules find them wherever the pack is installed."""
import os
import sys
HERE = os.path.dirname(os.path.abspath(__file__))
DATA = os.path.join(HERE, "data")
TREE = os.path.abspath(os.path.join(HERE, "..", ".."))
os.environ.setdefault("ORACLE7_MOVES", os.path.join(DATA, "moves.json"))
os.environ.setdefault("ORACLE7_SCENES", os.path.join(DATA, "scenes.json"))
os.environ.setdefault("ORACLE7_MOVES_SCENES", os.path.join(DATA, "moves_scenes.json"))
os.environ.setdefault("ORACLE7_REL_LEXICON", os.path.join(DATA, "rel_lexicon.json"))
os.environ.setdefault("ORACLE7_TK", os.path.join(DATA, "tk"))
os.environ.setdefault("ORACLE7_TMP", os.path.join(DATA, "tk"))
os.environ.setdefault("ORACLE7_RELSTORE_DIR", os.path.join(TREE, "root", "relstore"))
os.environ.setdefault("ORACLE7_WT", os.path.join(TREE, "root", "wander-train"))
os.environ.setdefault("ORACLE7_DAILYDIALOG", os.path.join(DATA, "dailydialog_raw.json"))
for p in (HERE, os.path.join(TREE, "root", "wander-train")):
if p not in sys.path:
sys.path.insert(0, p)