Skip to content

Make adding a language mean adding a file - #45

Merged
peopleworks merged 1 commit into
mainfrom
adding-a-language-is-adding-a-file
Aug 5, 2026
Merged

Make adding a language mean adding a file#45
peopleworks merged 1 commit into
mainfrom
adding-a-language-is-adding-a-file

Conversation

@peopleworks

Copy link
Copy Markdown
Owner

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.csproj listed 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.json into 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.

AnalysisResult now carries RulePackLanguage beside Language, 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.md gains 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

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>
@peopleworks
peopleworks merged commit 7c112a5 into main Aug 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant