Skip to content
This repository was archived by the owner on Oct 10, 2026. It is now read-only.

feat(007): D5a licence relabel tool, D8 strict filler filter, A7 - #110

Merged
scrimshawlife-ctrl merged 4 commits into
mainfrom
cursor/d1-relabel-filter-a7-41af
Sep 24, 2026
Merged

scrimshawlife-ctrl merged 4 commits into
mainfrom
cursor/d1-relabel-filter-a7-41af

Conversation

@scrimshawlife-ctrl

Copy link
Copy Markdown
Owner

Operator: go D1 + relabel + filter + A7.

  • D5(a) scripts/shadow/hyperlexical/license_relabel.py: marks Wiktionary-sourced SoT rows CC BY-SA 4.0 (Wiktionary); <label note> and adds source_license: CC-BY-SA-4.0 (+ source_url). Sidecar unbind rows derived from them get the same mark. Idempotent, with backups. Spark dry run: 709 SoT rows + 80 sidecar rows. The live relabel runs from main after merge (D1).
  • D8 scripts/shadow/hyperlexical/filler_filter.py: HYPERLEX_FILLER_FILTER (default strict) drops unbind rows with handles, links, markup, wiki scraps or punctuation-stuck tokens, and fails closed if one reaches the vocab. Allows contractions ('em, honkin'). On the morph78 vocab it rejects 115 of 1,971. Receipts record the mode and drop counts. morph78-train-env.json pins off, so the 1b equivalence still reproduces morph78.
  • D6 → A7 (amendments.md): the A1 ceiling counts trunk parameters; cards report trunk and total. milestones and the Hub card are updated.
  • Results doc lists the decisions taken plus the clean retrain constraints: cold start (no warm-start from morph65/78), exclude CC BY-SA rows from the release set, strict filter, refreeze the holdout manifest.

Validation: pytest 809 passed; check / smoke PASS; mkdocs strict PASS. The branch tree is byte-identical to the tested local commit.

@scrimshawlife-ctrl
scrimshawlife-ctrl merged commit 8de7cb1 into main Sep 24, 2026
5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e870f8b083

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"wiktionary.org" in str(row.get("harvest_page") or "")
or "wiktionary" in str(row.get("provenance") or "").lower()
or bool(row.get("wiktionary_categories"))
or str(row.get("license") or "").startswith("CC BY-SA")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restrict the licence fallback to Wiktionary rows

When a store contains content from another CC BY-SA source, this predicate classifies it as Wiktionary solely from the licence prefix. relabel() then assigns source_license=CC-BY-SA-4.0, propagates that attribution to text-matching harvest rows, and may leave a contradictory older-version license value because relabelled() preserves every CC BY-SA... string. Require actual Wiktionary provenance rather than treating all CC BY-SA content as Wiktionary.

Useful? React with 👍 / 👎.

Comment on lines +83 to +84
def _load(path: Path) -> list[dict]:
return [json.loads(l) for l in path.read_text(encoding="utf-8").splitlines() if l.strip()] if path.is_file() else []

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fail when a required relabel input is missing

If --store is misspelled or points to a missing file, _load() silently returns an empty dataset and the command exits successfully with a zero-change summary, making an unapplied licence migration appear valid. A missing --harvest behaves inconsistently and later fails in copy2() only when store changes exist. Since both CLI inputs are required, reject missing files before producing a success summary.

Useful? React with 👍 / 👎.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant