Make adding a language mean adding a file - #45
Merged
Conversation
The project told contributors that its extension points are JSON anyone can send by pull request and never compiled code. The rule packs were listed one by one in the .csproj, so a French speaker could not be heard without editing the build — the exact thing that stops somebody contributing a language. A wildcard now embeds every rules.*.json, matching what the report resources already did. Verified by actually doing it: dropping a rules.fr.json into the folder made three tests fail, and the way they failed is the proof — they assert French has no pack, and it had one, with nothing else touched. Also fixes what that promise would otherwise expose. Loading English rules for a language with no pack was silent, while the result went on claiming the language asked for. Running English tells over French prose finds almost nothing, and reporting that as a French analysis presents "nothing fired" as a result when nothing French was ever looked for. The result now carries RulePackLanguage alongside Language, and when they differ the report says so above the error rate — because a rate measured on English writing describes nothing about rules reading a language they were never written for. Tests use "zz" and never a real code, so the day somebody contributes the language used as the example, a welcome pull request does not look like a regression. Refs #44. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Refs #44.
This project tells contributors that its extension points are JSON anyone can send by pull request, never compiled code. The rule packs contradicted that:
SignsOfAI.Core.csprojlisted them one file at a time, so a French speaker could not be heard without editing the build. That is precisely the friction that stops somebody contributing a language.A wildcard now embeds every
rules.*.json, matching what the report resources already did.Verified by actually doing it, not by reading the XML. Dropping a
rules.fr.jsoninto the folder made three tests fail — and how they failed is the proof: they assert French has no pack, and it suddenly had one, with nothing else touched. The demo pack was then removed and the tests moved to"zz", never a real code, so the day somebody contributes the language used as the example, a welcome pull request does not look like a regression.It also fixes what that promise would otherwise expose. Loading English rules for a language with no pack was silent, while the result went on claiming the language that was asked for. English tells over French prose find almost nothing, so reporting that as a French analysis presents nothing fired as a result when nothing French was ever looked for.
AnalysisResultnow carriesRulePackLanguagebesideLanguage, and where they differ the report says so — above the error rate, because a rate measured on English writing describes nothing about rules reading a language they were never written for. Translated into Spanish, hash-pinned like the rest.CONTRIBUTING.mdgains an Adding a whole language section that states the uncomfortable half too: a new language has no measured error rate, and ~75 pre-2022 texts are worth more to that language's users than the rule pack is.260 Core tests green. (The two ONNX model tests fail under a full-solution run on this machine with a
bad allocation— memory pressure from loading models in parallel, not a defect: they pass 7/7 run on their own, and nothing in ONNX is touched here.)🤖 Generated with Claude Code