Commit Graph
305 Commits
Author SHA1 Message Date
BFlat 69ef3a4b06 Merge pull request #4207 from ruchirguitar/feat/indic-scripts-hyphenation
proof: hyphenate Bengali, Assamese, Punjabi, Odia, Tamil, Telugu, Kannada and Malayalam between aksharas
2026-11-30 00:29:51 +07:00
ruchirguitar a482a59510 proof: Malayalam's vertical-bar and circular viramas join no conjunct 2026-11-29 20:22:55 +05:30
ruchirguitar de89cc0e30 proof: Kannada jihvamuliya and upadhmaniya lead their akshara; Malayalam samvruthokaram is a vowel 2026-11-29 19:38:44 +05:30
ruchirguitar 657e0fca46 proof: Bengali khanda ta written with a joiner; a cluster ending in an older chillu is dead
TA, virama and ZWJ is khanda ta and ends the syllable before, as the letter does. A consonant cluster that ends in a chillu or khanda ta written the older way has no vowel, so no break carries it to the next line. From CodeRabbit on #4207.
2026-11-29 09:12:42 +05:30
ruchirguitar 2dbb39ec93 proof: a Malayalam chillu can lead a conjunct; KA has no legacy chillu
A chillu followed by a virama starts a conjunct, as its consonant would (NTA written with chillu N). Only NNA, NA, RA, LA and LLA have the older consonant, virama and ZWJ spelling of a chillu. Found by a local CodeRabbit review.
2026-11-29 08:32:09 +05:30
ruchirguitar ef851c9669 proof: Malayalam dot reph leads its akshara; legacy chillus only on chillu consonants
The dot reph starts an akshara with the consonant it joins instead of acting as a virama. A consonant, virama and ZWJ is a chillu only for the six chillu consonants, and a break after one still needs a live akshara. Found by a local CodeRabbit review.
2026-11-29 08:28:24 +05:30
autocraft-bot[bot] 172614aca8 Merge pull request #523 2026-11-29 00:14:32 +00:00
Lucas Batista Vargas 61f353d623 proof: accept German coordinated compounds with ellipsis (wordcraft#5903) (#3415) 2026-11-28 23:51:01 +00:00
BFlat b8be138ea7 Merge pull request #3998 from dotCooCoo/fix/proof-stem-scan-count
proof: the large MAP test counts lookups instead of CPU time
2026-11-29 03:00:40 +07:00
ruchirguitar c9f53a3f7e proof: Malayalam chillus written with a joiner, Tamil SHRII and a dead KSSA
A Malayalam consonant, virama and ZWJ is a chillu and ends the syllable before, as a chillu letter does. Tamil keeps SHRII (with SA or SHA) whole, and a KSSA with a pulli closes the syllable before. Found by a local CodeRabbit review.
2026-11-29 00:29:55 +05:30
ruchirguitar 14016ef7c9 proof: hyphenate Bengali, Assamese, Punjabi, Odia, Tamil, Telugu, Kannada and Malayalam between aksharas
Script tables for Bengali, Gurmukhi, Odia, Tamil, Telugu, Kannada and Malayalam on the shared Brahmic layout, each listing only where it differs. Dead consonants written as letters of their own (khanda ta, chillus, nakaara pollu) end the syllable before. Tamil, which joins no conjuncts, breaks after the pulli; KSSA stays whole. Script::of maps the pack languages bn, as, pa (Gurmukhi only), or, ta, te, kn and ml.

Part of storytold/vectorcraft#4947.
2026-11-29 00:25:25 +05:30
BFlat 04a35631af Merge pull request #3911 from ruchirguitar/fix/proof-zwj-words
proof: keep zero-width joiners inside words
2026-11-28 23:11:01 +07:00
BFlat d34538f9c6 Merge pull request #3921 from ruchirguitar/feat/marathi-hyphenation
proof: hyphenate Marathi between aksharas
2026-11-28 23:10:49 +07:00
dotCooCoo 02b6bb361d proof: the large MAP test counts lookups instead of CPU time
large_maps_do_not_multiply_stem_scan_work compared the thread CPU time
(or the elapsed time, where /proc/thread-self/schedstat is missing) of
suggestions with 1,000 and 8,000 MAP groups and stems, and printed the
times. A test-only counter now records each letter MapLookup::fold
folds, and each group and member alternatives() reads. The test checks
that the larger dictionary takes at most 10 times the lookups of the
smaller one, and that fold gives the same answers with the groups taken
away, so it reads only its index. With fold scanning the groups, the
lookups grow from 9,007,999 to 408,042,999, and with the groups taken
away fold returns ą for ą instead of a; the test fails either way.
2026-11-27 18:43:00 -08:00
FredApps c3b71fae9f Merge pull request #2829 from yoriswind/codex/affix-continuation-alias-setup
proof: reuse continuation aliases during dictionary setup
2026-11-27 23:03:15 +01:00
ruchirguitarandClaude Opus 5.5 0c71ed22f4 proof: a joined word repeated on purpose is still allowed
Joined words are now repeat-checked, but the words a language repeats on
purpose are listed without joiners, so જલ્‍દી જલ્‍દી (with a ZWJ) was
marked as a repeated word (CodeRabbit on #3911). Compare the word
without its joiners against that list; the mark and suggestion keep the
typed spelling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 00:01:30 +05:30
ruchirguitarandClaude Opus 5.5 1e41166b86 proof: hyphenate Marathi between aksharas
Marathi is written in Devanagari, like Hindi, but has no proofing
language of its own: `mr`, `mr-IN` and `mar` are pack languages, which
fell to the English rules and got no break. indic::Script::of now maps
them to Devanagari, so Marathi words break between aksharas, joiners
stay inside conjuncts, and a Marathi pack's patterns reach the same
words (the pack check now covers every language Script::of maps).

Part of storytold/vectorcraft#4947.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:55:45 +05:30
ruchirguitarandClaude Opus 5.5 e77608ed05 proof: use indic::is_joiner for words, one copy of the helper
#3905 added indic::is_joiner with the same body as crate::is_joiner
(bflatastic on #3911): drop the lib.rs copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:53:34 +05:30
ruchirguitar 27acf5c8ea Merge remote-tracking branch 'upstream/main' into fix/proof-zwj-words 2026-11-27 23:52:25 +05:30
ruchirguitarandClaude Opus 5.5 986e0a568e proof: look up a joiner run's next letter once per run
words() searched past the whole joiner run for every joiner in it, so a
letter followed by N joiners cost about N²/2 checks (CodeRabbit on
#3911). The answer is the same for every joiner of a run: keep it until
the next non-joiner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:17:24 +05:30
BFlat c88d044c0f Merge pull request #3905 from ruchirguitar/fix/indic-joiners
proof: keep zero-width joiners inside Indic conjuncts
2026-11-28 00:34:44 +07:00
ruchirguitarandClaude Opus 5.5 8a5a402f4b proof: keep zero-width joiners inside words
words() ended a word at a zero-width joiner or non-joiner, so a Hindi or
Gujarati word written with one in a conjunct (क्‍ष, પુસ્‍તક) was split and
each half was spell-checked and repeat-checked alone. A joiner between
two letters, digits or marks is now inside the word (UAX #29); one at a
word's edge is not. The Gujarati/Hindi lookup tries the word as typed,
then without its joiners, as a dictionary with Hunspell's IGNORE would.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:48:04 +05:30
ruchirguitarandClaude Opus 5.5 7dff06d72b proof: Indic pack patterns reach words with joiners
With joiners now inside an Indic word, the Gujarati pack guard (the
Gujarati block only) turned a word with a ZWJ or ZWNJ away from its
pack, so a pack exception for it was skipped. Gujarati and Hindi now
check the script's letters, marks and joiners (indic::Script::is_letter),
as their rules do, and still need the pack to know the word.

CodeRabbit on #3905.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:27:05 +05:30
ruchirguitar 8aff71b9f8 Merge remote-tracking branch 'upstream/main' into fix/indic-joiners
# Conflicts:
#	crates/proof/src/indic.rs
2026-11-27 22:25:46 +05:30
ruchirguitarandClaude Opus 5.5 998a000af5 Merge upstream main; every_lang() draws Hindi too
#3899 added ProofLang::Hi, and on main it went into the old fixed list
(17 entries, range still 0u8..16, so Other wasn't drawn). Keep
every_lang() and add L::Hi to its match and list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:23:09 +05:30
ruchirguitarandClaude Opus 5.5 70286ac3e6 proof: one copy of the script checks for Gujarati and Hindi; Hindi akshara hyphenation
The spelling check and the repeated-word and spacing checks move to
script_checks, which takes a language's Script (its letters, digits and
an optional second spelling) and Rules (messages, repeat policy). Gujarati
uses it with the predicates it had, so its behaviour is unchanged; Hindi
uses the Devanagari letters from indic and its nukta spellings.
ProofLang::Hi maps to indic::Script::Devanagari, so Hindi words break
between aksharas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 21:56:17 +05:30
ruchirguitarandClaude Opus 5.5 b42509ee63 proof: keep zero-width joiners inside Indic conjuncts
A ZWJ or ZWNJ after a virama (choosing how a conjunct is drawn) ended
the letter run, so a Gujarati word with one was hyphenated as two short
parts and got no break. In a language with Indic rules a joiner is now
part of the word, and the akshara rules keep it inside its conjunct and
never break next to it. Other languages still end a run at a joiner.

Follow-up to #3901 (CodeRabbit review). Part of storytold/vectorcraft#4947.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 21:51:37 +05:30
ruchirguitar 9e754e1dc4 Merge remote-tracking branch 'upstream/main' into feat/add-hindi-proof 2026-11-27 21:30:59 +05:30
ruchirguitarandClaude Opus 5.5 3123577f6f proof: indic docs link no private item
The module docs linked the private Script::kind, which the workspace docs
check (-D warnings) rejects, and gave ProofLang::Gu a redundant explicit target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 20:57:14 +05:30
ruchirguitarandClaude Opus 5.5 a771429124 proof: no doc link from the public Hindi grammar module to a private item
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 20:55:26 +05:30
ruchirguitarandClaude Opus 5.5 401d95a5ab proof: the mixed-spans proptest draws every language
mixed_spans_never_panic drew from a hand-written list that never had
EnAu, Bg, Hr, De or a Pack language, and its fixed index range needed
#3887 after Gujarati was added. It now picks with
proptest::sample::select from every_lang(), which lists every ProofLang
next to an exhaustive match, so a new variant doesn't compile until it
is listed. A `fr` tag stands for the Pack languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 20:43:35 +05:30
ruchirguitarandClaude Opus 5.5 4ecc5e3ed0 proof: rustfmt the indic module
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 20:36:25 +05:30
ruchirguitarandClaude Opus 5.5 5b5de9fc19 proof: rustfmt the Hindi module
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 20:31:44 +05:30
ruchirguitarandClaude Opus 5.5 36b53c4bcf proof: Hindi (hi, hi-IN) spelling, suggestions and grammar
ProofLang::Hi for hi, hi-IN and hin: spelling from an installed hi_IN
Hunspell dictionary (not bundled), dictionary-driven suggestions, and
generic checks (repeated words, spacing, ratios with Devanagari digits)
with Hindi messages. The Devanagari pieces (letters, digits, both
spellings of nukta letters, the spelling check and the generic checks)
are in a shared devanagari module for later Devanagari languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 19:53:26 +05:30
ruchirguitarandClaude Opus 5.5 d14a23d33b proof: hyphenate Gujarati between aksharas
Gujarati words fell to the English rules and got no break. They now
break only between orthographic syllables (aksharas): never inside a
conjunct, never before a vowel sign or mark, and never before a dead
final consonant. The rules come from the script's Unicode encoding (the
shared Brahmic block layout), so no pattern file is read. A `gu` Language
pack's patterns still come first.

The new `indic` module also carries the Devanagari table, so Hindi and
the other Devanagari languages need only a `Script::of` mapping.

Part of storytold/vectorcraft#4947.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 19:53:19 +05:30
ruchirguitarandClaude Opus 5.5 2476cd8340 proof: the mixed-spans proptest draws every language again
Adding Gujarati grew the language list in mixed_spans_never_panic to 16,
but the index range stayed 0..15, so the last entry, ProofLang::Other,
was never drawn. The range is now 0..16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 14:46:04 +05:30
ruchirguitarandClaude Opus 5.5 7fa53a4c23 test(proof): restore Gujarati NOSUGGEST collector coverage
The merge from main dropped nosuggest_stems_and_forms_are_never_offered
because the shared assert_nosuggest_is_honoured helper was removed in
25597ecfc. Rebuild the fixture inline with AffixDict::from_hunspell, as
main's tests now do, covering prefixed/suffixed forms, REP replacements
and mixed-case input through the Gujarati suggest_in, plus a
Gujarati-script NOSUGGEST stem. No production code changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 06:06:18 +05:30
ruchirguitarandClaude Opus 5.5 c6477d2818 Merge remote-tracking branch 'upstream/main' into feat/add-gujarati-proof
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 05:10:04 +05:30
Renato Pinto 8c8eab7a4a Merge main into pt-pt-regions
Main moved craft-proof's tests: the from_tag cases this branch extended are gone, so lang.rs gets its own European Portuguese test, and the dictionary asserts go into tests.rs.
2026-11-26 23:07:02 +00:00
yoriswind 011956be91 Share continuation flag resolution within the affix modules 2026-11-26 10:37:45 -08:00
yoriswind 77aa9dab9d Port strict continuation alias reuse onto the current affix modules 2026-11-26 10:32:34 -08:00
aiongg 0593def5d0 craft-openpgp, craft-raw, craft-captions, craft-xml, craft-ods, craft-proof, craft-font-subset, craft-drawingml: smaller or gated passes 2026-11-24 19:48:21 +00:00
ruchirguitar eb40a69e3d test(proof): replace wall-clock timing assertion with deterministic bounded suggestions check 2026-11-23 14:16:46 +05:30
ruchirguitar c29d4b7485 Proofing: handle Gujarati digits in grammar/spelling and check pack patterns fit 2026-11-21 22:09:34 +05:30
ruchirguitar 42958efaa4 Proofing: add Gujarati (gu_IN) spelling, suggestion dispatch and grammar checks 2026-11-21 21:54:24 +05:30
yoriswind f5a0a14581 proof: reuse alias keys and final continuation set IDs 2026-11-21 06:05:16 -08:00
yoriswind 33702a095c proof: compare aliased and literal continuation output 2026-11-21 06:02:54 -08:00
yoriswind 4a691d8897 proof: format continuation alias compatibility checks 2026-11-21 04:42:30 -08:00
yoriswind c6a6a19089 proof: share continuation alias parsing during setup 2026-11-21 04:41:28 -08:00
yoriswind f6efa4760b proof: format continuation alias compatibility checks 2026-11-21 04:35:42 -08:00