Skip to content

Releases: gasyoun/kosha

v0.13.0 — Sanskrit data-hub P-D3 (public data + tools directory page)

Choose a tag to compare

@gasyoun gasyoun released this 06 Jul 17:14

Added

  • Sanskrit data-hub P-D3: public data + tools directory page. Executor:
    Opus 4.8 (claude-opus-4-8), MG ruling D-HUB-7 (06-07-2026), handoff H236.
    • directory/index.html
      (live at gasyoun.github.io/kosha/directory)
      — the first curated directory for Sanskrit computational linguistics: 9
      public datasets (downloadable), 6 restricted (listed "on request"), and 8
      external stacks (vidyut/Ambuda, Sanskrit Heritage/INRIA, Samsaadhanii/SCL,
      DharmaMitra, DCS, VedaWeb, Cologne CDSL) with what-it-does / how-to-call /
      license / our-relation.
    • scripts/build_directory.py
      renders it from data/manifest/datasets.json
      • a new data/manifest/external_tools.json
        (single sources — no facts hand-copied into HTML). Carries schema.org
        Dataset JSON-LD per public asset on an Organization @id spine (SEO
        playbook P0) — the lever for Google/Yandex Dataset Search indexing.
    • datasets.json gained a release_asset field on the 7 released rows so the
      page can build 1-click download URLs from the manifest.
    • Test invariants: tests/test_directory.py
      (one Dataset node per public row, @id spine, no restricted-download or
      gitignored-path leak). Wired from the README + docs-site landing footer.

v0.12.0 — Sanskrit data-hub P-D0 (roadmap + datasets manifest)

Choose a tag to compare

@gasyoun gasyoun released this 06 Jul 15:33
6f8832d

kosha becomes the org Sanskrit data-hub (MG rulings 06-07-2026). See DATA_HUB_ROADMAP.md + data/manifest/datasets.json. First data release: data-v0.1.0. Full changelog in CHANGELOG.md.

data-v0.1.0 — Sanskrit data-hub, first public tier (crosswalks · headwords · roots · frequency)

Choose a tag to compare

@gasyoun gasyoun released this 06 Jul 15:50
6f8832d

First public-tier release of the Sanskrit data-hub (DATA_HUB_ROADMAP.md P-D1). Seven canonical derived datasets, ~29 MB, 718k rows total — all already public in their source repos, re-bundled here with stable download URLs so any agent session or researcher can fetch them without cloning four repos. Machine-readable index: datasets.json (also attached).

Asset Rows Keying Source
mw_roots.tsv 2,113 SLP1 root + verb_type csl-orig
mw_etymology.tsv 9,377 headword→root derivation csl-orig
dcs_cdsl_xref.tsv 15,902 DCS lemma ↔ CDSL headword csl-apidev
union_headwords.tsv 323,425 SLP1 union headword master SanskritLexicography
mw_heritage_crosswalk.tsv 185,803 MW ↔ Heritage entry SanskritLexicography
lemma_frequency.tsv 83,277 SLP1 lemma DCS frequency kosha
zaliznyak_grammar_index.tsv 98,639 SLP1 headword → paradigm token SanskritLexicography

License: CC BY-SA 4.0. Snapshots as of 06-07-2026 — canonical live copies remain in the source repos; canonical hosting moves to samskrtam.ru at P-D4.

v0.11.0 — Search history + analytics (Phase C frontend)

Choose a tag to compare

@gasyoun gasyoun released this 05 Jul 20:03
ecf205c

History.svelte + Stats.svelte added to the K2b inflection UI's tab bar — recent-searches panel with magic-link request form, and an aggregate-stats dashboard (Chart.js daily-volume chart + top-terms table). Both hidden when no live API is configured. Completes H205's frontend scope on top of the Phase A/B backend (v0.10.0→main, PR #15).

See CHANGELOG.md for full detail.

v0.10.0

Choose a tag to compare

@gasyoun gasyoun released this 05 Jul 09:24
c7e358b

Added

  • Wave E1 (inflection roadmap) — dual-engine comparison, nominal pass.
    Executor: Opus 4.8 (claude-opus-4-8).
    • scripts/compare_vidyut_cologne.py
      diffs vidyut-prakriya (0.4.0, local library — R12-clean, no live call)
      against the ingested Cologne inflections tables, classifying every
      case×number cell (AGREE/DIFF/VIDYUT_ONLY/COLOGNE_ONLY) with DIFF
      sub-classification (ṇatva / pronominal / final-stop / superset / fork).
    • E1_DIVERGENCE_REPORT.md
      90.5 % cell agreement over 240k cells / 10k entry-bearing nominal stems.
      Findings: the ṇatva bug (MWinflect#6)
      is confirmed with a larger blast radius than the documented 69 (89 stems
      in the top-10k sample); pronominal stems (sarva) mis-modelled as nominals;
      cardinal numerals (saptadaśan) missing from Cologne but generated by
      vidyut; feminine consonant/monosyllabic-stem derivation forks. Continues Jim
      Funderburk's Cologne-vs-Huet line (csl-inflect#10)
      with an independent third engine.
    • Recommendation: hybridize (keep Cologne base per D3, layer vidyut to
      auto-fix ṇatva + fill gaps + flag forks) — filed as an @decide for MG.

Notes

  • E1 remainder is human-gated: the migrate/hybridize/stay ruling (MG
    @decide) and the give-back post to csl-inflect#10 (diplomacy-gated,
    drafted not posted), plus the agent-doable verb comparison (answers
    csl-inflect#8) — all queued in
    H185.
    E1 raw comparison output (data/e1/) is gitignored (regenerable).

v0.9.0

Choose a tag to compare

@gasyoun gasyoun released this 05 Jul 08:29
1e6e501

Added

  • P4 Wave K2b (H183) — the translator-first Sanskrit inflection lookup
    UI
    , the frontend half of the drastically-improved Cologne inflection tool.
    Executor: Opus 4.8 (claude-opus-4-8).
    • Svelte 5 + Vite app (ui/)
      building into docs/inflect/,
      served by the existing Pages deploy at gasyoun.github.io/kosha/inflect/
      (62 kB JS bundle). Four features (H183 K2b-3, roadmap Wave K3 folded in):
      stem → paradigm (auto-detect input → SLP1, Devanagari-default
      case×number / verb grids with an IAST/SLP1 toggle), paste-anything
      reverse analysis
      (wraps /analyze, shows resolved_by provenance),
      autocomplete (prefix range-seek over the shared 323k lemmas.json,
      live transliteration), and dictionary cross-links (every stem links to
      its in-app MW/PWG/AP90 entry; the entry has a "show all forms" control back
      to the paradigm — two silos, one tool).
    • Data backend is "both" (K2b-2, ui/src/lib/datasource.js):
      static pre-generated JSON by default (works with no live server
      RISKS.md R1/R5/R12-clean), and the live FastAPI /api/v1/… when
      window.KOSHA_API is set. Stage-3 vidyut segmentation degrades honestly to
      segmentation_available:false in the static tier (the live-API path
      resolves it).
    • New GET /api/v1/paradigm/{lemma} endpoint + shared
      app/paradigm.py
      grouping module, and
      scripts/build_paradigms.py
      emitting parity-locked static paradigm + reverse-index shards
      (--demo committed, --all deployed by MG out-of-band per A3). Bridged
      stems fold (BagavantBagavat).
    • Auto-detect input (Devanagari/IAST/SLP1) via the vendored sanskrit-util
      JS package (SHARED_CODE.md family #1 — no new transcoder); Devanagari
      rendering uses slp1_to_devanagari (composes matras/conjuncts) not the
      naive iast_to_devanagari.
    • Tests: 6 new pytest (tests/test_paradigms.py, endpoint + static-shard
      byte-parity) → 167 passed; 17 vitest (translit auto-detect, token
      parity, prefix seek, static data-path integration, full App e2e).
    • Data caveat surfaced verbatim (D3): the Cologne m_a ṇatva bug
      (MWinflect#6) is shown as-is, not silently "fixed" in the frontend.

Notes

  • Roadmap Wave K3 folded into K2b per MG 05-07-2026 — the inflection roadmap
    now owes only Wave E1 (dual-engine vidyut comparison).
  • Pages tier re-measured: docs/inflect/ = 2.0 MB (app + committed demo data);
    total tier ~404 MB, ~60% headroom under the 1 GB soft limit unchanged.

v0.8.0 — P4 K2a: reverse-lookup pipeline + verb ingest + stem bridge

Choose a tag to compare

@gasyoun gasyoun released this 05 Jul 07:24

Added

  • P4 Wave K2a (H181) — reverse-lookup query pipeline, verb-form ingest,
    and the stem-normalization bridge. Executor: Opus 4.8 (claude-opus-4-8).
    • Reverse-lookup cascade (app/reverse_lookup.py)
      behind GET /api/v1/forms/{form}/analyze: inflections exact hit →
      forms witness → vidyut-cheda segmentation of a sandhied/compound
      string, each stage tagged with a resolved_by provenance field
      (inflections/forms/segmentation/null). Segmentation
      (app/segmenter.py)
      runs vidyut 0.4.0 as a local library over vendored data
      (data/vidyut/, gitignored); no live third-party call at build or query
      (RISKS.md R12), and it degrades to an honest miss (segmentation_available: false) when the data isn't vendored.
    • Verb conjugations ingested — the upstream MWinflect Python-2 syntax
      bug in verbs/pysanskritv2/inputs/clean.py (parenthesized-tuple lambda
      parameter) that blocked verbs/redo.sh in K1 is fixed and prepared as an
      on-its-merits upstream PR. scripts/build_inflections.py
      now loads present-system conjugations (pre/ipf/ipv/opt × active/middle/
      passive) into inflections (+67,140 rows; total 6,916,522) with new
      person/tense/voice columns (NULL for nominals). So Bavati now
      resolves as 3sg present of BU.
    • Stem-normalization bridge (scripts/build_stem_bridge.py
      stem_bridge table, --stage stem_bridge) maps strong/weak stem-spelling
      variants across inflections (Bagavat) and forms (Bagavant) to one
      canonical lemma key. Narrow, data-gated rule (nt→t / drop-final-n, only
      when the two spellings share a surface form) — 380 mappings; the named exit
      case Bagavant → Bagavat unifies to one lemma.
    • Tests: new tests/test_reverse_lookup.py
      (cascade, verb ingest, bridge, segmentation + graceful degradation); full
      suite 161 passed. Documented in
      data/SOURCES.md
      (incl. the ṇatva caveat and the honest dharmakSetre-resolves-at-stage-1
      deviation from the brief's assumption).

v0.7.0 — P3 evidence layer + P4 Wave K1 (Cologne inflection tables)

Choose a tag to compare

@gasyoun gasyoun released this 03 Jul 15:46

Phase 3 (evidence layer) + Phase 4 Wave K1 (inflection data ingest), landed together via #9.

P3 — Evidence layer

  • Frequency band (1–5) on lemmas, thresholds derived from D5's measured fact that the top-10k ranked lemmas cover 95.4% of corpus token mass.
  • One corpus example per lemma (Sanskrit + aligned Russian) from corpus_lexicon.jsonl — per lemma, not per sense (the feed has no sense-level tagging).
  • /api/v1/search now ranks by exact-key-match-first, then frequency rank.
  • Every evidence field carries a source provenance label; fails closed (null, never fabricated) with no DCS signal.

P4 Wave K1 — inflection tables

  • Cologne/MWinflect nominal declension tables ingested as a new inflections sidecar: 6.85M rows, 3.27M distinct forms.
  • New GET /api/v1/forms/{form}/analyze endpoint.
  • Verb conjugations blocked by an upstream Python-2 syntax bug in MWinflect's verbs/ pipeline — documented, not patched.

Full suite: 149 passed, 1 pre-existing unrelated failure (docs-site staleness check).

Model: Sonnet 5 (claude-sonnet-5)

v0.6.0 — H111: Heritage/INRIA forms as third, low-trust forms witness

Choose a tag to compare

@gasyoun gasyoun released this 03 Jul 14:56

Added

  • H111: Heritage/INRIA forms as a third, low-trust forms witness.
    forms gains a nullable category column (migrated in scripts/build_db.py
    for pre-existing kosha.dbs) and scripts/build_forms.py now loads
    heritage_only_forms.tsv
    as source='heritage', purely additive and loaded last: +951,991 rows
    (dcs 397,843 and vidyut 28,567 unchanged). Trust ordering
    dcs > vidyut > heritage — Heritage's declension engine over-generates
    grammatically-possible but unattested forms — documented in
    ARCHITECTURE.md,
    build_forms.py, and
    KOSHA_DECISIONS_NEEDED.md.
    /api/v1/form already returned source per result, so heritage-only hits
    are distinguishable client-side without an API change.

Full Changelog: https://github.com/gasyoun/kosha/blob/main/CHANGELOG.md#060---2026-07-03

v0.5.0 — P2 static-cache generator for the Pages tier (D5-3)

Choose a tag to compare

@gasyoun gasyoun released this 03 Jul 06:25
0325346

[0.5.0] - 2026-07-03

Phase 2 (public alpha) first agent-doable slice: the static-cache generator
that emits the GitHub Pages tier from kosha.db (branch feat/p2-static-cache,
Opus 4.8 claude-opus-4-8), built to the fixed D5-3 targets. 107 → 115 tests
green. Enabling Pages / deploying stays MG's (A3).

Added

  • P2 static-cache generator
    scripts/build_static_cache.py
    emits three deliverables from the local DB (never a live service, R12), each
    matching KOSHA_DECISIONS_NEEDED.md
    D5-3:
    1. Sharded per-lemma cards — one JSON per lemma (never one bundle; a single
      lemmas.json crosses the 100 MB/file cap at ~33k), for the 50,355
      lemmas with both a dict entry and a corpus attestation, frequency-ranked
      so a partial/interrupted run front-loads value (top-10k = 95.4% of corpus
      token mass) and resumes idempotently (existing shards skipped). Each card is
      byte-identical to GET /api/v1/lemma/<slp1>?in=slp1 (reuses app/
      render/scan/transliterate — no reimplementation). ~155 MB, ~3 KB/file.
    2. Headword autocomplete index — one ~13 MB columnar file, all 323,425
      lemmas (slp1+iast+dicts); this is what the gitignored
      docs/js/data/lemmas.json path holds (D5-3a: the INDEX, not the cards),
      plus a tiny attested_keys.json sidecar so the UI picks static-vs-dynamic
      without a 404 probe.
    3. Full 222,179-lemma card set as an opt-in --full-tarball release asset
      (R1c/R4 rebuildability), deterministic (mtime=0), not committed.
  • Card filename encoding (card_token) — keeps [a-z0-9] verbatim, escapes
    every other UTF-8 byte (incl. uppercase — SLP1 is case-significant and would
    collide on a case-insensitive FS) as _<hexbyte>; lossless, URL/FS-safe, with
    a documented JS twin for the frontend.
  • docs/README.md
    the Pages static-tier layout, token scheme + JS twin, and regeneration/deploy
    commands.
  • tests/test_static_cache.py
    (8 tests) — locks card↔live-API byte parity, card_token case-safety and
    lossless round-trip, ranked-shard generation, and index/attested counts
    (323,425 / 50,355).

Changed

  • .gitignore — the generated Pages tier (docs/cards/,
    docs/js/data/attested_keys.json, alongside the already-ignored
    docs/js/data/lemmas.json) is regenerable and MG-deployed, so it is not
    committed.