[en-GB] Mark Oxford spellings as errors

Hello,
I need to mark Oxfod -ize spellings as incorrect for a British English text. At the moment, LanguageTool is finding non-Oxford spellings. I need it to do the opposite, but I can’t find a rule for this. Is there an easy way to set this up? Thanks!
Mark

Currently, that’s not possible. We have an issue for this already, but I can’t make any promises about when it will be implemented.

Thanks. I really need this feature because I’m doing a big translation project for a customer who wants British English with -ise spellings. At the moment, I’m working through the Trados plugin and a local server. If I paid for premium and switched to a public server, selecting British English without Oxford spellings, would that work?

I don’t think so, but you could just try it.

If you use a local server anyway, you could write your own rule. The one that suggests ize spellings is OXFORD_SPELLING_Z_NOT_S and maybe it can simply be modified to do the opposite of what it does now. You can find that rule in en/grammar.xml or en/style.xml (depending on which version of LT you use).

Thanks. I have no clue about modifying code but I produced something that will hopefully work with the help of ChatGPT. But I’m not sure how to replace the existing rule with the new one (I’m using the Trados plugin rather than the standalone app).

You can just edit it in the grammar.xml (or style.xml) file directly and then restart your local LT server for it to become active.

It is a rule group, not a single rule. Thus, it will require a bunch of edits.

        <rulegroup id="OXFORD_SPELLING_Z_NOT_S" name="Oxford spelling is/iz">
        <!-- For general notes and design decisions, refer to OXFORD_SPELLING_ISE_VERBS. Rules developed by Mike Unwalla. -->
        <!-- Not uppercase: https://github.com/languagetool-org/languagetool/issues/1292 -->
            <url>https://www.lexico.com/grammar/ize-ise-or-yse</url>
            <antipattern><!-- Dans l'organisation de ces autonomies... -->
                <token>l</token>
                <token spacebefore="no" regexp="yes">&apostrophe;</token>
                <token spacebefore="no" postag_regexp="yes" postag="NN.*"/>
            </antipattern>
            <antipattern><!-- If the token before or the token after is a proper noun, then the target token is probably part of a proper name, and not a common noun. Example: Organisation of Islamic Cooperation. -->
                <token postag_regexp="yes" postag="NNPS?"/>
                <token postag_regexp="yes" postag="NNPS?"/>
            </antipattern>
            <rule id="OXFORD_SPELLING_NOUNS" name="Oxford spelling of nouns (~iz not ~is), **but not CAPITALISATIONS of nouns**"><!-- Always ~isement not ~izement. Always ~ision, not ~izion. -->
            <!-- For the suggestion, regexp_match and regexp_replace are sufficient. The token finds an ~is noun that has a singular or plural postag. If the ~is noun has a postag, then the ~iz noun should have that postag. (Possibly, the pairs of words are used differently in different locales, and thus they have different postags.) -->
                <pattern>
                    <token postag_regexp="yes" postag="NN(:UN?)?|NNS" inflected="yes" regexp="yes">([a-z]+?-?[a-z]+?)is(ation|er|ability)<exception regexp="yes">(?-i)[A-Z-]+</exception>
                    <exception regexp="yes" inflected="yes">improvisation|xxxx</exception><!-- This exception is for nouns that are always spelled with ~isation. -->
                    <exception>passivisations</exception><!-- This exception prevents the incorrect suggestion: ". TODO: correct the problem. -->
                    <exception regexp="yes" inflected="yes">(advert|adv|appra|bru|chast|circumc|comprom|(battle)?cru|curtain-ra|desp|dev|disfranch|disgu|dispra|enfranch|exerc|franch|fundra|hell-?ra|improv|ka|merchand|mort|po|pract|pra|prom|ra|reappra|repr|rev|r|surm|surpr|upra|upr)iser</exception><!-- These nouns are always ~iser. -->
                    <exception regexp="yes" inflected="yes">(adv|d|)isability</exception></token><!-- These nouns are always ~isability. -->
                </pattern>
                <message>In British English, for some nouns, both ~s and ~z spellings are possible. By default, the rule for Oxford spelling is on for nouns and thus suggests <suggestion><match no="1" suppress_misspelled="yes" regexp_match="([a-z]+?-?[a-z]+?)is(ations?|ers?|ability|abilities)" regexp_replace="$1iz$2"/></suggestion>.</message>
                <short>Oxford spelling: nouns</short>
<!-- ~isation--><example correction="organization">The word '<marker>organisation</marker>' is not the Oxford spelling.</example>
                <example correction="Organizations">The word '<marker>Organisations</marker>' is not the Oxford spelling.</example>
                <example>The word '<marker>organization</marker>' is the Oxford spelling.</example>
                <example>The word '<marker>organizations</marker>' is the Oxford spelling.</example>
                <example>'<marker>Americanisation</marker>' is NNP.</example><!-- TODO. Is 'Americanisation' a proper noun? -->
                <example>'<marker>Americanisations</marker>' is NNPS.</example>
                <example>'<marker>ORGANISATION</marker>. All capitalised nouns are out of scope because the suggestion is ~ise.</example>
                <example>Most of the surviving paperwork, up until 1986, for successful <marker>naturalisations</marker> is now held at The National Archives (www.nationalarchives.gov.uk/help-with-your-research/research-guides/naturalisation-british-citizenship/).</example><!-- TODO. naturalisations[naturalization/NNS and naturalizations[naturalization/NNS. Is the word not found because  naturalisation[naturalisation/NN:UN but naturalization[naturalization/NN:U ? -->
                <example correction="Demutualizations">'<marker>Demutualisations</marker>: LT gives a spelling warning for demutualizations. BUT LT also suggests the Oxford spelling although the suggestion uses suppress_misspelled="yes". Why?</example>
                <example>These words are always spelled with ~isation: improvisation/improvisations</example>
                <example correction="de-energization"><marker>de-energisation</marker></example>
                <example>Dans <marker>l'organisation</marker> de ces autonomies, la Belgique a réalisé...</example>
                <example>year=2009 |publisher=<marker>L'Organisation</marker> internationale de la Francophonie</example>
                <example><marker>de-energisations</marker> has no postag.</example>
                <example>catheterisations, componentisations, demonisations, depoliticisations, depressurisations, immortalisations, incentivisations, intellectualisations, legitimisations, lionisations, memorialisations, militarisations, neutralisations, nominalisations, parameterisations, particularisations, photosensitisations, plagiarisations, productisations, professionalisations, proselytisations, repressurisations, satirisations, scandalisations, schematisations, sensualisations, sodomisations, spiritualisations, tenderisations, universalisations, vandalisations</example><!-- TODO: Add plural POS for these words. Are all the plurals standard BrE? -->
                <example>The suggestion for the noun plural <marker>passivisations</marker> is: ". Thus, </example><!-- TODO. If we cannot prevent a suggestion of "", then this word and similar must be in an exception.-->
                <example>'World Health Organization' uses ~z, but the '<marker>Organisation of Islamic Cooperation</marker>' uses ~s.</example>
                <example type="triggers_error">For information about the <marker>Shanghai Cooperation Organisation</marker>, refer to http://eng.sectsco.org/about_sco/.</example>
                <example type="triggers_error">File:<marker>Panneau de signalisation multilingue à Issers (Algérie).jpg</marker></example>
<!-- ~iser --> <example correction="modernizer">The word '<marker>moderniser</marker>' is not the Oxford spelling.</example>
                <example correction="Modernizers">The word '<marker>Modernisers</marker>' is not the Oxford spelling.</example>
                <example correction="Americanizer">The word '<marker>Americaniser</marker>' has the postag NNP (and NN). Thus, do not use an NNP exception.</example>
                <example>The word '<marker>modernizer</marker>' is the Oxford spelling.</example>
                <example>The word '<marker>Modernizers</marker>' is the Oxford spelling.</example>
                <example>Make sure that the regexp is correct. These are all ~iser nouns: advertisers, advisers, appraisers, bruisers, chastisers, circumcisers, compromisers, battlecruisers, curtain-raisers, despisers, devisers, disfranchisers, disguisers, dispraisers, enfranchisers, exercisers, franchisers, fundraisers, hell-raisers, hellraisers, improvisers, kaisers, merchandisers, mortisers, paralysers, poisers, practisers, praisers, promisers, raisers, reappraisers, reprisers, revisers, risers, surmisers, surprisers, upraisers, uprisers.</example>
                <example>'<marker>MODERNISER</marker>. All capitalised nouns are out of scope because the suggestion is ~ise.</example>
                <example>The <marker>Stratocruiser</marker> set a new standard for luxurious air travel (www.boeing.com/history/products/model-377-stratocruiser.page).</example>
                <example type="triggers_error">The first Liquid only events were <marker>Liquidiser</marker> at Bristol Academy.</example>
<!-- ~isability--><example correction="magnetizability">The word '<marker>magnetisability</marker>' is not the Oxford spelling.</example>
                <example correction="Magnetizability">The word '<marker>Magnetisability</marker>' is not the Oxford spelling.</example>
<!--                <example correction="Magnetizabilities">The word '<marker>Magnetisabilities</marker>' is not the Oxford spelling.</example> TODO. Find a plural example. -->
                <example correction="polarizability">This effect (<marker>polarisability</marker>) is shown to be...</example>
                <example>The word '<marker>magnetizability</marker>' is the Oxford spelling.</example>
                <example>Refer to <marker>www.example.com/polarisability.html</marker>.</example>
                <example>Make sure that the regexp is correct. These are all ~isability nouns: advisability, disability, disabilities</example>
                <example>'<marker>MAGNETISABILITY</marker>. All capitalised nouns are out of scope because the suggestion is ~ise.</example>
            </rule>
            <rule id="OXFORD_SPELLING_ISE_VERBS" name="Oxford spelling of verbs (~ize not ~ise), **but not CAPITALISED verbs**"><!-- ~yse verbs are not ~yze in BrE: https://www.lexico.com/grammar/ize-ise-or-yse -->
                <pattern>
                    <token postag_regexp="yes" postag="VB.*" inflected="yes" regexp="yes">([a-z]+?-?[a-z]+?)ise<exception regexp="yes">(?-i)[A-Z-]+</exception><exception regexp="yes" inflected="yes">abscise|advertise|advise|affranchise|alias|appraise|arise|braise|bruise|chastise|circumcise|comprise|compromise|counterpoise|cruise|demise|despise|devise|disenfranchise|disfranchise|disguise|dispraise|enfranchise|equipoise|excise|exercise|franchise|fundraise|improvise|incise|liaise|merchandise|misadvise|miscategorise|misraise|mortise|noise|outraise|overexercise|overpraise|overpromise|paralyse|poise|porpoise|practise|praise|premise|previse|prise|promise|raise|readvertise|readvise|rearise|reappraise|reprise|repromise|re-raise|reraise|revise|rise|supervise|surmise|surprise|televise|trellis|underpraise|upraise|uprise|wise</exception></token><!-- suppress_misspelled does not work with some verbs. The fail-safe solution is to put ~ise-only verbs in the exception. AmE prize = BrE prise (move or lift). BrE prize = to value. Aside: some z spellings are not verbs but are correct spellings: example 'braize' is a fish. --><!-- TODO: merchandize is a verb, but rare -->
                    <!-- Remove uppercase from the rule: case_sensitive="yes" in the token does not work; (?-i)([a-zA-Z][a-z]+... in the regexp does not work. Use an exception. -->
                </pattern>
                <message>In British English, for some verbs, both ~s and ~z spellings are possible. By default, the rule for Oxford spelling is on for verbs and thus suggests <suggestion suppress_misspelled="yes"><match suppress_misspelled="yes" no="1" regexp_match="([a-z]+?-?[a-z]+?)is(e|es|ed|ing)" regexp_replace="$1iz$2" /></suggestion>.</message><!-- Cannot use postag_regexp="yes" postag="(VB.*)" postag_replace="$1" because it causes the suggestion to be the same as the target token. -->
                <short>Oxford spelling: ~ise verbs</short>
                <example correction="organize">The verb '<marker>organise</marker>' is not the Oxford spelling.</example>
                <example>The word '<marker>organize</marker>' is the Oxford spelling.</example>
                <example correction="organizes">Who usually <marker>organises</marker> the meetings?</example>
                <example correction="Organized"><marker>Organised</marker> the meeting? Ha!</example>
                <example correction="organizing">Basic <marker>organising</marker> principles are...</example>
                <example correction="de-energize"><marker>de-energise</marker></example>
                <example correction="De-energizes"><marker>De-energises</marker></example>
                <example correction="de-energized"><marker>de-energised</marker></example>
                <example correction="de-energizing"><marker>de-energising</marker></example>
                <example>The word '<marker>otherwise</marker>' is not a verb.</example>
                <example>In tests, the words 'surprise' and 'Surprise' caused no warning, but <marker>SURPRISE</marker> and all its uppercase inflections caused a warning. This problem occurs with other verbs also. Solution: put all ~ise-only base verbs in an exception. [Keep this note for reference. Refer to the next example/comment.]</example>
                <example><marker>CAPITALISED</marker> verbs are out of scope. In tests, for all verbs, the suggestion for the capitalised verb was the ~ise spelling.</example>
                <example>The rule finds verbs that are only all lowercase or initial caps. Not: <marker>ORGANise</marker></example>
                <example>All ~ise-only verbs are in an exception. As a fail-safe test, keep this list of inflections that previously caused incorrect warnings: alias [aliased], arise [arose], porpoise [aviation slang], trellis [VBZ = trellises]</example>
                <example>These rare/obsolete ~ise-only verbs have no postag: annalise, bepraise, debruise, disseise, grandise, grise, hoise, marmalise, misprise, remise, re-rise, rerise, seise, sensibilise, unpromise, </example>
                <example><marker>recentralise</marker> is not found because suppress_misspelled="yes". 'Recentralize' has no pos.</example><!-- TODO: get a more obscure example as a test. -->
            </rule>
            <rule id="OXFORD_SPELLING_ADJECTIVES" name="Oxford spelling of adjectives (~iz not ~is), **but not adjectives in CAPITALS**"><!-- ~isable, ~isational, ~ised, ~ising -->
                <pattern>
                    <token postag="JJ" regexp="yes">([a-z]+?-?[a-z]+?)is(able|ational|ed|ing)<exception regexp="yes">(?-i)[A-Z-]+</exception>
                    <exception regexp="yes">advisable|hair-raising|ill-advised|improvisational|inadvisable|memorisable|raisable|self-advertising</exception><!-- These adjectives are always ~is. Some adjectives are ~isible (divisible, indivisible, invisible), but I did not find ~isible adjectives that are also spelled ~izible.-->
                    <exception regexp="yes">(un)?(advis|bruis|circumcis|compromis|devis|(dis)?enfranchis|disguis|enterpris|excis|exercis|franchis|immunocompromis|improvis|incis|noncompromis|pois|practis|promis|rais|recognis|revis|supervis|surpris|televis)(ed|ing)</exception></token><!-- These words (adjectives/past participle adjectives/verbs are always ~is. Some words such as 'excised' do not have the postag JJ, but in some contexts, disambiguation DT_VBN_JJ gives the postag JJ to the VBN word (also, other rules do similarly). Possibly, some un* words do not exist, but that is not a problem. -->
                </pattern>
                <message>In British English, for some adjectives, both ~s and ~z spellings are possible. By default, the rule for Oxford spelling is on for adjectives and thus suggests <suggestion><match no="1" suppress_misspelled="yes" regexp_match="([a-z]+?-?[a-z]+?)is(able|ational|ed|ing)" regexp_replace="$1iz$2"/></suggestion>.</message>
                <short>Oxford spelling: adjectives</short>
                <example correction="magnetizable">The adjective '<marker>magnetisable</marker>' is not the Oxford spelling.</example>
                <example correction="Magnetizable">The adjective '<marker>Magnetisable</marker>' is not the Oxford spelling.</example>
                <example correction="organizational">Her <marker>organisational</marker> ability is good.</example>
                <example correction="randomized">These <marker>randomised</marker> controlled trials are...</example>
                <example correction="unappetizing">This food is <marker>unappetising</marker>.</example>
                <example>The word '<marker>magnetizable</marker>' is the Oxford spelling.</example>
                <example>'<marker>MAGNETISABLE</marker>. All capitalised adjectives are out of scope because the suggestion is ~is.</example>
                <example>...as a parody of modern DJs' own soundbites and <marker>self-advertising</marker> pieces.</example>
                <example>These words are always spelled with ~s: advisable, advised, bruised, circumcised, compromised, disenfranchised, divisible, excised, franchised, immunocompromised, improvised, inadvisable, incised, indivisible, invisible, memorisable, noncompromised, poised, practised, promised, raised, revised, surprised, televised, uncircumcised, unenfranchised, unrevised, unsupervised, unsurprised. Enterprising, excising, incising, noncompromising, promising, surprising, uncompromising, unsurprising</example>
                <example>For information about the <marker>Conference of Specialised Ministers</marker> refer to www.coe.int/en/web/cm/iguide-chapter6</example><!-- Refer to disambiguation.xml CONFERENCE_OF_SPECIALISED_MINISTERS -->
            </rule>
            <rule id="OXFORD_SPELLING_ADVERBS" name="Oxford spelling of adverbs (~iz not ~is), **but not adverbs in CAPITALS**"><!-- ~isably, ~isationally) -->
                <pattern>
                    <token postag="RB" regexp="yes">([a-z]+?-?[a-z]+?)is(ably|ationally)<exception regexp="yes">(?-i)[A-Z-]+</exception>
                    <exception regexp="yes">(in)?advisably</exception></token><!-- These adverbs are always ~is.-->
                </pattern>
                <message>In British English, for some adverbs, both ~s and ~z spellings are possible. By default, the rule for Oxford spelling is on for adverbs and thus suggests <suggestion><match no="1" suppress_misspelled="yes" regexp_match="([a-z]+?-?[a-z]+?)is(ably|ationally)" regexp_replace="$1iz$2"/></suggestion>.</message>
                <short>Oxford spelling: adverbs</short>
                <example correction="organizationally">The adverb '<marker>organisationally</marker>' is not the Oxford spelling.</example>
                <example correction="Organizationally">The adverb '<marker>Organisationally</marker>' is not the Oxford spelling.</example>
                <example>The word '<marker>organizationally</marker>' is the Oxford spelling.</example>
                <example>Not an adverb in standard English: ...he came to an opening, choked with timbers and bars of iron; <marker>surmisably</marker> the front portal at present in disuse.</example>
                <example>'<marker>ORGANISATIONALLY</marker>. All capitalised adjectives are out of scope because the suggestion is ~is.</example>
            </rule>
         </rulegroup>

Too complicated for me. I found a -ise Hunspell dictionary instead.