Skip to content

Commit

Permalink
[en] gb/us lexical variants, update rule priority
Browse files Browse the repository at this point in the history
  • Loading branch information
jaumeortola committed Jul 22, 2024
1 parent 121a45f commit bd5aa49
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,6 @@ protected int getDefaultRulePriorityForStyle() {
id2prio.put("GIMME", -4); // prefer over spelling rules
id2prio.put("LEMME", -4); // prefer over spelling rules
id2prio.put("ID_CASING", -4); // prefer over spelling rules but not over ID_IS
id2prio.put("EN_GB_SIMPLE_REPLACE", -5); // higher prio than Speller
id2prio.put("EN_US_SIMPLE_REPLACE", -5); // higher prio than Speller
id2prio.put("MORFOLOGIK_RULE_EN_US", -10); // more specific rules (e.g. L2 rules) have priority
id2prio.put("MORFOLOGIK_RULE_EN_GB", -10); // more specific rules (e.g. L2 rules) have priority
id2prio.put("MORFOLOGIK_RULE_EN_CA", -10); // more specific rules (e.g. L2 rules) have priority
Expand Down Expand Up @@ -663,6 +661,12 @@ protected int getPriorityForId(String id) {
if (id.startsWith("EN_MULTITOKEN_SPELLING_")) {
return -9; // higher than MORFOLOGIK_*
}
if (id.startsWith("EN_GB_SIMPLE_REPLACE")) {
return -5; // higher than MORFOLOGIK_*
}
if (id.startsWith("EN_US_SIMPLE_REPLACE")) {
return -5; // higher than MORFOLOGIK_*
}
if (id.equals("QB_EN_OXFORD")) {
return -51; // MISSING_COMMA_AFTER_YEAR
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,64 +4,94 @@
#The list includes mostly words from http://www.learnenglish.de/mistakes/USvsBrEnglish.html
# en-US -> en-GB
airplane=aeroplane
stroller=pram
airplanes=aeroplanes
#stroller=pram
automaker=carmaker
automakers=carmakers
#bathroom=toilet #to be researched
#bellboy=page
candy apple=toffee apple
checking account=current account
checking accounts=current accounts
#chips=crisps
corrections officer=prison officer
corrections officers=prison officers
cotton candy=candy floss
diapers=nappies
drapes=curtains
drunk driving=drink-driving
elevator=lift #exception: grain elevator [AE=BE], verb "to lift"
emcee=compere
eraser=rubber
erasers=rubbers
faucet=tap
faucets=taps
Ferris wheel=big wheel
fish sticks=fish fingers
flashlight=torch
freeway=motorway
freeways=motorways
turnpike=motorway
turnpikes=motorways
#French fries=chips #chips is too polysemous, also "fish and chips" must not be corrected
garbage=rubbish
#garbage=rubbish
garters=suspenders
gasoline=petrol
grippe=flu
#highway=main road #to be researched
#hood=bonnet #careful, those are also hats in AE and BE
#jelly=jam #possible problems with verb "jam" and non-food jelly
knapsack=rucksack
knapsacks=rucksacks
moving van=removal van
movie=film
moving vans=removal vans
#movie=film
#oatmeal=porridge
#pacifier=dummy #dummy has other meanings in BE
pantyhose=tights
parking lot=car park
parking lots=car parks
parking enforcement officer=traffic warden
#pitcher=jug
at recess=during breaktime
#report card=school report #to be researched
galoshes=wellingtons
#run=ladder #make into rule: only nylon context
scallion=spring onion
scallions=spring onions
sedan=saloon
sidewalk=pavement
sidewalks=pavements
bathroom sink=washbasin
skillet=frying-pan
skillets=frying-pans
slicker=mackintosh
streetcar=tram
streetcars=trams
#suspenders=braces
sweater=jumper
sweaters=jumpers
thumbtack=drawing-pin
thumbtacks=drawing-pins
#toilet=!toilet #to be researched
trash=rubbish
trash can=dustbin
trolley car=tram
trolley cars=trams
#trunk=boot #make a rule! trunks and boots are a thing in both AE and BE
undershirt=vest
vacation=holiday
windshield=windscreen
windshields=windscreens
zipper=zip
zippers=zips
mom=mum
moms=mums
burglarize=burgle
burglarizes=burgles
burglarized=burgled
burglarizing=burgling
countertop=worktop|work surface
countertops=worktops|work surfaces
clothespin=clothes peg
clothespins=clothes pegs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
#The list includes mostly words from http://www.learnenglish.de/mistakes/USvsBrEnglish.html
# en-GB -> en-US
aeroplane=airplane
aeroplanes=airplanes
pram=stroller
prams=strollers
#toilet=!toilet #to be researched
#page=bellboy
toffee apple=candy apple
toffee apples=candy apples
#funfair=carnival
#current account=checking account
crisps=chips
Expand All @@ -33,10 +36,12 @@ motorway=freeway
#jam=jelly #possible problems with verb "jam" and non-food jelly
#rucksack=knapsack
removal van=moving van
removal vans=moving vans
#porridge=oatmeal
#knickers=panties #do not tell AE to say knickers=panties
#tights=pantyhose
traffic warden=parking enforcement officer
traffic wardens=parking enforcement officers
#jug=pitcher
#public school=private school
#bank holiday=public holiday
Expand All @@ -48,15 +53,20 @@ wellingtons=galoshes
#spring onion=scallion
Sellotape=Scotch tape
washbasin=bathroom sink
washbasins=bathroom sinks
mackintosh=slicker
#tram=streetcar
#braces=suspenders
#jumper=sweater
#last post=taps
drawing-pin=thumbtack
drawing pin=thumbtack
drawing-pins=thumbtacks
drawing pins=thumbtacks
#rubbish=trash
#dustbin=trash can
lorry=truck
lorries=trucks
#boot=trunk #make a rule! trunks and boots are a thing in both AE and BE
#vest=undershirt
#windscreen=windshield

0 comments on commit bd5aa49

Please sign in to comment.