Repository navigation
Deepen lexical ambiguity handling - #55
Conversation
Dialect quality was still too thin around coger/tomar/agarrar-style ambiguity. This adds explicit lexical ambiguity rules, inserts them into semantic prompts, and makes certification fixtures assert multi-trait output groups so outputs must preserve both the object and the correct action sense. Constraint: Provider quality must be tested through executable fixtures, not prose-only dialect notes. Rejected: Keep requiredOutputAny only | it allowed one token to satisfy a multi-part semantic requirement Confidence: high Scope-risk: moderate Directive: Add new ambiguous verbs as lexical ambiguity rules plus required output groups; do not bury them only in free-text notes. Tested: pnpm build; pnpm test; pnpm audit --audit-level low; focused lexical/dialect fixture tests; live qwen3.5-9b and qwen3.6-35b es-MX adversarial eval; npm pack dry-run guard
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b385122e5
ℹ️ 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".
| { | ||
| id: "pickup-package", | ||
| dialects: TABOO_RISK_COGER_DIALECTS, | ||
| sourcePattern: /\b(pick up|grab|get|take)\b.{0,40}\b(package|packages|parcel|order|badge|ticket)\b/i, |
There was a problem hiding this comment.
Tighten pickup-package regex to avoid order-detail false matches
The pickup-package trigger currently matches any pick up|get|take ... order text, so common phrases like “Get order details” or “Take customer orders” will incorrectly receive physical-pickup guidance (recoger/retirar). In those scenarios, the new ambiguity prompt can push translations toward the wrong action and meaning. Narrowing this rule (for example by removing bare order or requiring explicit pickup/package cues) would avoid misclassifying non-pickup content.
Useful? React with 👍 / 👎.
Code Review Roast 🔥Verdict: 1 Pre-existing Issue | Recommendation: Merge Oh wait, this PR is actually clean. I had my flamethrower warmed up and everything. But there's a pre-existing comment on Overview
Issue Details (click to expand)
🏆 Best part: The 💀 Worst part: The pre-existing regex comment is still open — 📊 Overall: Like a well-seasoned cast iron skillet — mostly fine, with one stubborn spot that needs a bit more scrubbing. Files Reviewed (9 files)
Reviewed by minimax-m2.5 · 397,827 tokens |
Brings GitHub main level with Forgejo main (ef214e5), the canonical repo, so GitHub carries what v0.3.2 is cut from. - **Roast fixes:** dictionary accents and meaning-safe swaps (#50), accented words in the register, voseo, gender and grammar checks (#51), the file sandbox and patched dependencies (#52), honest claims and a pinned toolchain (#53), and adjective agreement, MCP vosotros parity, the real engine in the demo, and no more "first" claim (#55). - **Branding:** the Hermes plugin icon (#54). - **Release:** every version and install path moves to 0.3.2 (#56). - **Security:** the voseo quote regex CodeQL flagged on this PR now runs in linear time (#57). - **Pages:** `docs/CNAME` is removed. The site already serves from kyanitelabs.github.io/DialectOS/ without a redirect. After this merges, both mains have the same files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RXhEX6WJsRZUyGhsp5WgGe --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
requiredOutputGroupsso certification can require multiple semantic traits, not just one token from a loose listWhy
The previous dialect profile had prose like "avoid literal coger," but that was too thin: it did not model which verb should be used for file pickup vs transit vs physical grab vs photo/medicine senses, and the fixture evaluator could pass when only one loose token matched. This change turns that dialect depth into executable constraints.
Verification
pnpm --filter @espanol/cli exec vitest run src/__tests__/lexical-ambiguity.test.ts src/__tests__/semantic-context.test.ts src/__tests__/dialect-eval.test.ts src/__tests__/adversarial-dialect-fixtures.test.tspnpm dialect:eval -- --dialects=es-MX --out=/tmp/dialectos-mx-ambiguity-evalLLM_API_URL=http://127.0.0.1:1234/v1/chat/completions LLM_API_FORMAT=openai LLM_MODEL=qwen3.5-9b LLM_ALLOW_LOCAL=1 LLM_TIMEOUT_MS=180000 pnpm dialect:eval -- --live --provider=llm --fixtures=packages/cli/src/__tests__/fixtures/dialect-adversarial --dialects=es-MX --out=/tmp/dialectos-mx-ambiguity-live-qwen35LLM_API_URL=http://127.0.0.1:1234/v1/chat/completions LLM_API_FORMAT=openai LLM_MODEL=qwen3.6-35b-a3b LLM_ALLOW_LOCAL=1 LLM_TIMEOUT_MS=240000 pnpm dialect:eval -- --live --provider=llm --fixtures=packages/cli/src/__tests__/fixtures/dialect-adversarial --dialects=es-MX --out=/tmp/dialectos-mx-ambiguity-live-qwen36pnpm buildpnpm testpnpm audit --audit-level lowgit diff --check