feat(dataset-updater): add Rules PT translation config - #228
Merged
Conversation
jsboige
force-pushed
the
feat/dataset-updater-rules-config
branch
from
April 24, 2026 00:24
de9b336 to
a99f228
Compare
Adds DatasetUpdater support for translating Argumentum Rules from FR to PT, replacing the need for standalone Python scripts. Changes: - Rule.cs: add Pk property + ClassMap mapping (primary key for DatasetUpdater) - Rules CSV: add pk column (Rules_01 through Rules_18) - DatasetUpdaterRootConfig.cs: add TranslateRulesToPt config (Enabled=false) - Prompt files for Rules FR→PT translation (markdown-aware, game terms preserved) Config details: - Model: gpt-5.4-mini (fallback: gpt-4.1-mini) - DivisionMode: SequentialChunks, ChunkSize=3 - FunctionCalling enabled, SelectEmptyTargets=false (overwrite all) - MaxDegreeOfParallelism=3 Complements PR #225 (Python-based PT Rules retranslation for immediate fix). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jsboige
force-pushed
the
feat/dataset-updater-rules-config
branch
from
April 24, 2026 00:49
a99f228 to
b5b5031
Compare
2 tasks
jsboige
added a commit
that referenced
this pull request
Apr 24, 2026
…-column fix(rules): restore pk column to Rules CSV (follow-up to #228)
This was referenced Apr 25, 2026
jsboige
added a commit
that referenced
this pull request
Apr 25, 2026
…anslations + fix BOM bug + csproj wildcards (#236) Closes #236. ## Summary ### Prompt refinement (#236) - Fix hallucinated "Vous → impératif" instruction (FR descriptions are declarative/nominal, not 2nd person) - Add canonical family mapping (9 EN / 12 PT / 12 RU families with fixed translations) - Wikipedia link caveat (no fabricated URLs, leave empty if uncertain) - Align assistant prompts with corrected user prompts ### csproj copy gap fix (#236) - Replace 21 explicit `<None Update>` entries with 2 wildcards (`*.txt`, `*.json`) - Fixes latent bug from #228/#231/#232: 21 resource files (Virtues/Scenarii/Rules prompts, CSV samples, Fallacies JSON) were not copied to bin output, blocking DatasetUpdater runs ### Virtues taxonomy translation campaign - EN: 218/223 (97.8%), 1468 _en fields - PT: 223/223 (100%), 1503 _pt fields (links cleared due to hallucination risk — see follow-up note) - RU: 220/223 (98.7%), 1480 _ru fields - All 8 family translations consistent across each language ### TokenManager fix - SharpToken throws on unknown models (e.g. gpt-5.4-mini) — added try/catch with cl100k_base fallback ### Critical bug fix: BOM accumulation in DatasetUpdater - `UtilityExtensions.cs`: strip BOM on read with `TrimStart('')` - `DataSetInfo.cs`: write without BOM via `new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)` - CSV: stripped 3 accumulated BOMs from header (1 per translation cycle EN/PT/RU) - Without fix: CsvHelper would silently mismatch `pk` column header → empty PK column → broken `SelectEmptyTargets` idempotency for all future DatasetUpdater runs ### Review feedback follow-ups 1. EN subsubfamily inconsistency — pk=4,5 "Actual argument" → "Real argument" (matching pk=3, canonical mapping) 2. PT links cleared (203 URLs) — conservative cleanup vs hallucination risk, can be regenerated via future PT run with corrected prompt + caveat ## Validation - ✅ Build: 0 errors, 17 warnings (identical to master) - ✅ Tests: 88 pass / 0 fail / 1 skip (identical to master) - ✅ CSV: 0 BOM, header `pk` clean - ✅ EN consistency: 3× "Real argument", 0× "Actual argument" 🤖 Generated with [Claude Code](https://claude.com/claude-code)
7 tasks
Collaborator
|
Post-hoc review — PR #228 Verdict: ✅ LGTM — with one concern about CSV edits This PR adds DatasetUpdater infrastructure for Rules FR→PT translation, replacing the standalone script from PR #225. The config follows the established pattern with Positive:
Concern:
Prompt quality (PT):
Good infrastructure addition. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds DatasetUpdater support for translating Argumentum Rules (FR→PT), replacing the need for the standalone Python script used in PR #225.
Changes
Pkproperty + ClassMap mapping (primary key for DatasetUpdater)pkcolumn (Rules_01throughRules_18)TranslateRulesToPtconfig (Enabled=false)PromptRulesTranslatePtUser.txt+PromptRulesTranslatePtAssistant.txtConfig details
gpt-5.4-mini(fallback:gpt-4.1-mini)SequentialChunks,ChunkSize=3pkRelationship to PR #225
PR #225 provides the immediate fix (Python script translation of 18 PT Rules). This PR provides the infrastructure so future Rules translations (EN, RU, or PT refresh) can use the DatasetUpdater directly.
Test plan
🤖 Generated with Claude Code