Skip to content

Add missing -ize/-ise words and fix two reversed word-list entries - #284

Merged
niksedk merged 1 commit into
mainfrom
claude/wordlist-ize-verbs-13583
Aug 14, 2026
Merged

Add missing -ize/-ise words and fix two reversed word-list entries#284
niksedk merged 1 commit into
mainfrom
claude/wordlist-ize-verbs-13583

Conversation

@niksedk

@niksedk niksedk commented Aug 13, 2026

Copy link
Copy Markdown
Member

Fixes the miss reported in SubtitleEdit/subtitleedit#13583 ("fantasize" => "fantasise") — and the rest of the same gap.

Word list

The shared list only covered 66 -ize verbs, so maximize, patronize, authorize, characterize, optimize, socialize, synchronize and ~95 more were missed as well. This adds 608 pairs:

  • 100 regular -ize/-ise verbs with all conjugations (-ize/-ized/-izes/-izing)
  • the conjugations missing for sanitize and deodorize (only the -ed form was listed)
  • agent nouns: synthesizer, sterilizer, vaporizer, digitizer, atomizer, nebulizer, sanitizer, deodorizer
  • -ization/-isation nouns, including for verbs that were already listed (specialization, utilization, mobilization, hospitalization, …)

The list drives both directions, so every pair has to be a genuine both-ways variant. Left out on purpose:

  • words that are -ise in both varieties — advertise, improvise, exercise, surprise, compromise, televise, supervise, capsize, prize, … — adding those would make British to American emit advertize
  • -yze/-yse verbs (catalyze), because catalyses/analyses collide with the noun plurals
  • glamorize (the -our stem makes the British form ambiguous), plus rare/one-sided ones like winterize, notarize, exorcize, systemize

Two bugs found while validating

  • us="dustbin" br="garbage can" was reversed — American to British turned dustbin into garbage can, and British to American did the opposite. Now us="garbage can" br="dustbin" (+ plural).
  • jewelery preceded jewelry, and for BR→US the first rule matching jewellery wins, so jewellery became the misspelling jewelery. Reordered, with a comment on why the order matters.

Keeping it fast

BuildProposals() runs on the UI thread in the window constructor, and 50% more rules would have made that worse. Each rule pattern starts with \b, so its first word can only ever match a whole word of the input — a line that does not contain that word can never match the pattern. Rules are now indexed by that first word, and a line runs only the handful of rules whose words it actually contains instead of all 5541. RegexOptions.Compiled is dropped along with it, since almost no rule runs per line now.

Verified byte-identical to the old full scan over a 49,560-line corpus (every word alone / in a sentence / uppercased / titlecased / glued to punctuation, tags and digits, plus 20,000 random multi-word lines) in both directions:

before after
construction (one direction) 96 ms 12 ms
convert 2000 lines 770 ms 1.5 ms

Checks

  • both plugins build clean
  • fantasize/fantasized/fantasizes/fantasizing + FANTASIZE/Fantasized convert in both directions
  • advertise, improvise, capsize, prize, surprise, exercise, compromise still untouched
  • <font color="#ff0000"> attribute still not Britishized

Needs a release dispatch for AmericanToBritish and BritishToAmerican (both embed the shared list), then a se5-plugins.json bump.

🤖 Generated with Claude Code

SubtitleEdit/subtitleedit#13583 reports "fantasize" not being converted.
The word list only covered 66 of the -ize verbs, so most common ones
(maximize, patronize, authorize, characterize, ...) were missed too.

Add 608 pairs: 100 regular -ize/-ise verbs with their conjugations, the
missing conjugations for "sanitize"/"deodorize", agent nouns (synthesizer,
sterilizer, ...) and -ization/-isation nouns, including those whose verb
was already listed. Only pairs where both spellings are genuine variants
of the same word, so BR->US stays safe as well - -ise-in-both words
(advertise, improvise, capsize, prize, surprise, ...) are left out, and
-yze/-yse verbs are skipped because "catalyses"/"analyses" collide with
noun plurals.

Also fix two entries found while validating:

- us="dustbin" br="garbage can" was reversed, so it Americanized in the
  Britishizer and vice versa.
- "jewelery" preceded "jewelry", and for BR->US the first rule matching
  "jewellery" wins, so it produced the misspelling.

50% more rules would have made the conversion pass slower still, so gate
the rules on a token index: a pattern starts with "\b", so its first word
can only match a whole word of the input, and a line without that word
can never match. Each line now runs the handful of rules whose words it
contains instead of all 5541. Output is byte-identical to the old scan
over a 49,560-line corpus in both directions; converting 2000 lines drops
from 770 ms to 1.5 ms and construction from 96 ms to 12 ms.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@niksedk
niksedk merged commit 062a019 into main Aug 14, 2026
33 checks passed
@niksedk
niksedk deleted the claude/wordlist-ize-verbs-13583 branch August 14, 2026 04:20
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