Files
bikoret/shoresh-engine/shoresh-engine.cabal
T
Scott KarpandClaude Fable 5.1 6d3411fcfa engine: a word's root is what L1 records for it (tablet 33)
The Shoresh Engine never opened L1 to find a root. extractRoots called
every word of two or three letters a root and dropped every longer one:
את → א-ת-ה (padded with a He the text never wrote), ואת → ו-א-ת,
בכל → ב-כ-ל; ויאמר, ואהבת, אלהים → nothing. Handed all of Devarim 6:5
it found no א-ה-ב. Binyan was "Qal" for everything, nouns included.

shoresh-engine:
- Shoresh.Roots: an index over all of L1 (5853 verses, built once at
  server start, <1 s). A word resolves, in order: from the verse in
  scope (its own shoresh, with the binyan read from the verb's
  morphology; else its lemma's shoresh — לבבך → לבב); else the way Torah
  most often reads that surface form (its commonest lemma decides, so
  אשר the particle has no root); else a root the asker named, if Torah
  knows it. A word in the verse that L1 gives no root has none, whatever
  a homograph elsewhere carries. Unknown words yield nothing.
- Roots are rendered as L1 records them: two letters stay two letters.
- binyan is null unless a verb stands in the scoped verse.
- L1 is found via L1_MOUNT_POINT, not the literal l1/ relative to cwd —
  which is why parse_tree was null on the pod.
- Adds "surface" and "derivation" to each root (verse|lemma|torah|
  named_root). 22 new HSpec examples; 55 examples, 0 failures.

vav_pipeline:
- normalize_root places a lemma-derived root at the word it was heard
  from (L1 has no shoresh on לבבך to search by).
- A binyan is printed only where there is one; "binyan unknown" on a
  noun claimed a question that does not exist.
- test/tablet33_engine_roots_test.exs: the new shape through the router.
- liveness_test: clear a halt leaked by halt_monitor_test (the seed
  0/191243 flake, present since before tablet 30).
  461 tests, 0 failures on seeds 0 42 191243.

Verified before push with BOTH built images, the real engine binary and
a local PostgreSQL 16 (SSL): Devarim 6:5 → א-ה-ב (Qal, word 1), י-ה-ו,
א-ל-ה, כ-ל (words 5,7,9), ל-ב-ב, נ-פ-ש, מ-א-ד; 4 interpretations
written to L3, 0 L3_WRITE_FAILED, health healthy.

NOT repaired here: the quality of L1's own shoresh field, which the
engine is now faithful to — ויהי is recorded as יהי, שמים as שמ, יהוה
as יהו, הבאתי as בא. That is the quarry's tablet (scripts/build_l1.py)
and it changes the L1 hash; a decision, not a patch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-04 17:28:08 +00:00

80 lines
2.3 KiB
Plaintext

cabal-version: 3.0
name: shoresh-engine
version: 0.1.0.0
synopsis: Core symbolic processing engine for Shorashim
description:
The Shoresh Engine encodes Biblical Hebrew triliteral roots and
seven binyanim as a typed functional system. It reads L1 (the
read-only Torah filesystem) and constructs meaning through root
activation, te'amim parsing, gematria computation, and smikhut
composition.
.
Ka'asher tzivah Hashem et Moshe.
license: NONE
author: Bezalel
build-type: Simple
-- The specification (Architecture §3.1, Construction §1.3)
-- pins these dependencies exactly. The freeze file will lock
-- all transitive deps. The aron is two and a half cubits.
library
exposed-modules:
Shoresh.Types
Shoresh.Gematria
Shoresh.Binyanim
Shoresh.Teamim
Shoresh.KetivQere
Shoresh.Smikhut
Shoresh.Lexicon
Shoresh.Roots
Shoresh.Graph
Shoresh.Havdalah
Shoresh.Kriah
Shoresh.KiTov
Shoresh.Server
Luchot.Firmware
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall -Wcompat
build-depends:
base >= 4.18 && < 4.19,
containers >= 0.6 && < 0.7,
text >= 2.0 && < 2.1,
aeson >= 2.2 && < 2.3,
vector >= 0.13 && < 0.14,
bytestring >= 0.12 && < 0.13,
filepath >= 1.4 && < 1.5,
directory >= 1.3 && < 1.4
executable shoresh-engine
main-is: Main.hs
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall -Wcompat
build-depends:
base >= 4.18 && < 4.19,
shoresh-engine,
containers >= 0.6 && < 0.7,
text >= 2.0 && < 2.1,
aeson >= 2.2 && < 2.3,
bytestring >= 0.12 && < 0.13,
filepath >= 1.4 && < 1.5,
directory >= 1.3 && < 1.4
test-suite shoresh-engine-test
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs: test
default-language: Haskell2010
ghc-options: -Wall -Wcompat
build-depends:
base >= 4.18 && < 4.19,
shoresh-engine,
hspec >= 2.11 && < 2.12,
text >= 2.0 && < 2.1,
aeson >= 2.2 && < 2.3,
containers >= 0.6 && < 0.7,
bytestring >= 0.12 && < 0.13