Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix: "reservation" annotations; issue #2120 (#2134)

Andrew Dunbar5124c0740e9b
diff --git a/harper-core/dictionary.dict b/harper-core/dictionary.dict
index 446f0843f..7a58b68bc 100644
--- a/harper-core/dictionary.dict
+++ b/harper-core/dictionary.dict
@@ -1120,6 +1120,7 @@ Benet/g
Benetton/g
Bengal/ONSg
Bengali/JNg
+Bengaluru/Og
Benghazi/Og
Benin/Og
Beninese/JNg
@@ -1606,7 +1607,7 @@ Burke/Og
Burks/Og
Burl/Og
Burlington/Og
-Burma/Og
+Burma/Og # old name of Myanmar
Burmese/JNOg
Burnett/Og
Burns/Og
@@ -1650,6 +1651,7 @@ CCTV/NO # closed-circuit television
CCU/N
CD/NSgV
CDC/ON
+CDMX/Og # Mexico City, see also DF
CDT/N
CEO/NgS # chief executive officer
CF/NOJ
@@ -1969,7 +1971,7 @@ Cesar/Og
Cesarean/JNg
Cessna/Og
Cetus/Og
-Ceylon/ONg
+Ceylon/ONg # old name of Sri Lanka
Ceylonese/JN
Cezanne/g
Cf/g
@@ -2037,6 +2039,7 @@ Chattahoochee/Og
Chattanooga/Og
Chatterley/Og
Chatterton/Og
+Chattogram/Og
Chaucer/Og
Chauncey/Og
Chautauqua/ONg
@@ -2111,7 +2114,7 @@ Chiron/Og
Chisholm/Og
Chișinău/Og
Chisinau/Og
-Chittagong/Og
+Chittagong/Og # old name of Chattogram
Chivas/g
Chloe/Og
Choctaw/ONJSg
@@ -2553,6 +2556,7 @@ DDT/NS
DE/ON # US state (Delaware)
DEA/ON
DEC/NOSd
+DF/Og # Distrito Federal, see also CDMX
DH/NO
DHS/O
DI/N
@@ -2581,6 +2585,7 @@ DUI/N
DVD/NS
DVR/NSgV
DWI/NV
+Dacca/Og # old spelling of Dhaka
Dachau/Og
Dacron/NSg
Dada/Ng
@@ -3320,6 +3325,7 @@ Esther/Og
Estonia/Og
Estonian/JNSg
Estrada/Og
+Eswatini/Og
Ethan/Og
Ethel/Og
Ethelred/Og
@@ -3862,6 +3868,7 @@ Gayle/Og
Gaza/Og
Gaziantep/Og
Gd/g
+Gdańsk/Og
Gdansk/Og
Ge/Og
Geffen/Og
@@ -5311,6 +5318,7 @@ Kalb/g
Kalevala/Og
Kalgoorlie/Og # city
Kali/Og
+Kaliningrad/Og
Kalmyk/JNOg # ethnicity
Kama/Og
Kamchatka/Og
@@ -5458,7 +5466,8 @@ Khabarovsk/Og
Khachaturian/Og
Khalid/Og
Khan/Og
-Kharkov/Og
+Kharkiv/Og
+Kharkov/Og # old name of Kharkiv
Khartoum/Og
Khayyam/g
Khazar/NOJg
@@ -5477,7 +5486,7 @@ Kidd/Og
Kiel/Og
Kierkegaard/Og
Kieth/g
-Kiev/ONg
+Kiev/ONg # old name of Kyiv
Kigali/Og
Kikuyu/NOg
Kilauea/Og
@@ -5549,6 +5558,7 @@ Knuths/O
Kobe/Og
Koch/Og
Kochab/Og
+Kochi/Og
Kodachrome/Og
Kodak/g
Kodaly/g
@@ -5565,6 +5575,8 @@ Kommunizma/g
Konami/Og
Kong/Og
Kongo/OgJ
+Königsberg/Og # old name of Kaliningrad
+Konigsberg/Og
Konrad/g
Koontz/Og
Koppel/g
@@ -5852,7 +5864,7 @@ Len/Og
Lena/Og
Lenard/Og
Lenin/Og
-Leningrad/Og
+Leningrad/Og # old name of St. Petersburg
Leninism/Nmg
Leninist/JNg
Lennon/Og
@@ -6127,6 +6139,8 @@ Ludwig/Og
Luella/Og
Lufthansa/Og
Luftwaffe/Og
+Lugansk/Og # old name of Luhansk
+Luhansk/Og
Luger/ONg
Lugosi/g
Luigi/Og
@@ -6154,7 +6168,7 @@ Luxembourgian/NJ
Luz/Og
Luzon/Og
Lviv/Og
-Lvov/Og
+Lvov/Og # old name of Lviv
LyX/g
Lyallpur/O
Lycra/Ng
@@ -6324,7 +6338,7 @@ Makarios/g
Maker/Og
Malabar/ONg
Malabo/Og
-Malacca/ONg
+Malacca/ONg # old spelling of Melaka
Malachi/Og
Malaga/Og
Malagasy/NgJ
@@ -6699,6 +6713,7 @@ Meir/Og
Mejia/Og
Mekong/Og
Mel/Og
+Melaka/Og
Melanesia/Og
Melanesian/JNg
Melanie/Og
@@ -7166,7 +7181,8 @@ Myrdal/Og
Myrna/Og
Myron/Og
Myrtle/Og
-Mysore/Og # old name of karnataka
+Mysore/Og # old name of karnataka state and mysuru city
+Mysuru/Og
Myst/g
N/Ng
N'Djamena/O # capital of Chad
@@ -7588,7 +7604,7 @@ October/ONVSg
Odell/Og
Oder/Og
Odesa/Og
-Odessa/Og
+Odessa/Og # old spelling of Odesa
Odets/g
Odia/ONg # language, previously Oriya
Odin/Og
@@ -8193,6 +8209,7 @@ Pompeian/JN
Pompeii/Og
Pompey/Og
Ponce/Og
+Pondicherry/Og # old name of Puducherry
Pontchartrain/g
Pontiac/ONSg
Pontianak/Og
@@ -8200,7 +8217,7 @@ Pontic/JOg
Ponzi/OgS
Pooh/Og
Poole/Og
-Poona/Og
+Poona/Og # old name of Pune
Pope/ONg
Popeye/Og
Popocatepetl/Og
@@ -8317,6 +8334,7 @@ Pu/Og # plutonium
Puccini/Og
Puck/Og
Puckett/Og
+Puducherry/Og
Puebla/Og
Pueblo/Og
Puerto/O
@@ -8326,6 +8344,7 @@ Pulaski/Og
Pulitzer/NOg
Pullman/NOSg
Punch/ONg
+Pune/Og
Punic/JNOg
Punjab/Og
Punjabi/JONwg
@@ -8492,7 +8511,7 @@ Randell/Og
Randi/g
Randolph/Og
Randy/Og
-Rangoon/Og
+Rangoon/Og # old name of Yangon
Rankin/Og
Rankine/Og
Raoul/g
@@ -9359,7 +9378,7 @@ Shula/Og
Shylock/ONg
Shylockian/g
Si/Og
-Siam/Og
+Siam/Og # old name of Thailand
Siamese/JONg
Sibelius/g
Siberia/ONg
@@ -9586,7 +9605,7 @@ Stael/g
Stafford/ONg
StairMaster/g
Stalin/Og
-Stalingrad/Og
+Stalingrad/Og # old name of Volgograd
Stalinism/Nmg
Stalinist/JNg
Stallone/Og
@@ -10027,6 +10046,7 @@ Thessaly/Og
Thieu/g
Thimbu/ONg # capital of bhutan
Thimphu/O # capital of bhutan
+Thiruvananthapuram/Og
Thomas/NOg
Thomism/Ng
Thomistic/Jg
@@ -10063,6 +10083,7 @@ Ticonderoga/Og
Tide/g
Tienanmen/Og
Tiffany/ONg
+Tiflis/Og # old name of Tbilisi
Tigris/Og
Tijuana/Og # city
Tillich/g
@@ -10097,6 +10118,7 @@ Titanic/JONg
Titian/Og # painter
Titicaca/Og # lake
Tito/Og # president
+Titograd/Og # old name of Podgorica
Titus/Og
Titusville/Og
Tl/g # thallium
@@ -10204,6 +10226,7 @@ Trippe/Og
Trisha/Og
Tristan/Og
Triton/Og
+Trivandrum/Og # old name of Thiruvananthapuram
Trobriand/Jg
Troilus/Og
Trojan/NgSJ
@@ -10360,8 +10383,10 @@ Uighur/ONJg
Ujungpandang/g
Ukraine/Og
Ukrainian/JNOSg
+Ulaanbaatar/Og
Ulster/ONg
Ultrasuede/Ng
+Uluru/Og
Ulyanovsk/Og
Ulysses/Og
Umbriel/Og
@@ -10580,6 +10605,8 @@ Vince/Og
Vincent/Og
Vindemiatrix/Og
Vineland/g
+Vinnitsa/Og # old name of Vinnytsia
+Vinnytsia/Og
Vinson/Og
Viola/Og
Violet/Og
@@ -11068,7 +11095,8 @@ Zane/Og
Zanuck/g
Zanzibar/Og
Zapata/Og
-Zaporozhye/Og
+Zaporizhzhia/Og
+Zaporozhye/Og # old name of Zaporizhzhia
Zapotec/NOJg # ethnicity
Zappa/Og
Zara/Og
@@ -19163,7 +19191,7 @@ cor/~N
coracle/NSg
coral/~NwSgJ
corbel/NSgV
-cord/~NSgVGdEr
+cord/~NSgVGdr
cordage/Ng
cordial/~JYNSg
cordiality/Nmg
@@ -41925,7 +41953,7 @@ resentful/~JYp
resentfulness/Nmg
resentment/~NgS
reserpine/Ng
-reservation/ ~NgS
+reservation/~NgS
resveratrol/Ng
reserved/~VtTJYU
reservedness/Nmg
diff --git a/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml b/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml
index cf6863881..aadc922c6 100644
--- a/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml
+++ b/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml
@@ -3207,9 +3207,9 @@ Message: |
2477 | eagerly that the Gryphon said, in a rather offended tone, “Hm! No accounting for
| ^~ Did you mean to spell `Hm` this way?
Suggest:
- - Replace with: “H”
- Replace with: “H'm”
- - Replace with: “Hem”
+ - Replace with: “Ha”
+ - Replace with: “Ham”
diff --git a/harper-core/tests/text/linters/Computer science.snap.yml b/harper-core/tests/text/linters/Computer science.snap.yml
index b0a2b1e10..1a50f419e 100644
--- a/harper-core/tests/text/linters/Computer science.snap.yml
+++ b/harper-core/tests/text/linters/Computer science.snap.yml
@@ -635,8 +635,8 @@ Message: |
| ^~ Did you mean to spell `A.` this way?
Suggest:
- Replace with: “Ax”
- - Replace with: “A”
- Replace with: “Ab”
+ - Replace with: “Ac”
@@ -988,9 +988,9 @@ Message: |
393 | term "architecture" in computer literature can be traced to the work of Lyle R.
| ^~ Did you mean to spell `R.` this way?
Suggest:
- - Replace with: “R”
- Replace with: “Rd”
- - Replace with: “Re”
+ - Replace with: “R”
+ - Replace with: “RC”
@@ -999,8 +999,8 @@ Message: |
394 | Johnson and Frederick P. Brooks Jr., members of the Machine Organization
| ^~ Did you mean to spell `P.` this way?
Suggest:
- - Replace with: “Pp”
- - Replace with: “Pa”
+ - Replace with: “Pt”
+ - Replace with: “P”
- Replace with: “Pd”
diff --git a/harper-core/tests/text/linters/Part-of-speech tagging.snap.yml b/harper-core/tests/text/linters/Part-of-speech tagging.snap.yml
index 169d4bb3f..88275fe31 100644
--- a/harper-core/tests/text/linters/Part-of-speech tagging.snap.yml
+++ b/harper-core/tests/text/linters/Part-of-speech tagging.snap.yml
@@ -39,8 +39,8 @@ Message: |
| ^~ Did you mean to spell `E.` this way?
Suggest:
- Replace with: “Em”
- - Replace with: “E”
- - Replace with: “Ea”
+ - Replace with: “Ed”
+ - Replace with: “EC”
@@ -78,7 +78,7 @@ Message: |
Suggest:
- Replace with: “Nun”
- Replace with: “Non”
- - Replace with: “N1”
+ - Replace with: “NV”
diff --git a/harper-core/tests/text/linters/The Great Gatsby.snap.yml b/harper-core/tests/text/linters/The Great Gatsby.snap.yml
index 69785b4aa..a0576e06f 100644
--- a/harper-core/tests/text/linters/The Great Gatsby.snap.yml
+++ b/harper-core/tests/text/linters/The Great Gatsby.snap.yml
@@ -819,7 +819,7 @@ Message: |
Suggest:
- Replace with: “Ta”
- Replace with: “Tb”
- - Replace with: “Ti”
+ - Replace with: “Tn”
@@ -828,7 +828,7 @@ Message: |
664 | it, you perceive, after a moment, the eyes of Doctor T. J. Eckleburg. The eyes
| ^~ Did you mean to spell `J.` this way?
Suggest:
- - Replace with: “Jr”
+ - Replace with: “Jg”
- Replace with: “J”
- Replace with: “JD”
@@ -853,7 +853,7 @@ Message: |
Suggest:
- Replace with: “Ta”
- Replace with: “Tb”
- - Replace with: “Ti”
+ - Replace with: “Tn”
@@ -862,7 +862,7 @@ Message: |
665 | of Doctor T. J. Eckleburg are blue and gigantic—their retinas are one yard high.
| ^~ Did you mean to spell `J.` this way?
Suggest:
- - Replace with: “Jr”
+ - Replace with: “Jg”
- Replace with: “J”
- Replace with: “JD”
@@ -929,8 +929,8 @@ Message: |
| ^~ Did you mean to spell `B.` this way?
Suggest:
- Replace with: “Bu”
- - Replace with: “B”
- Replace with: “Be”
+ - Replace with: “Bf”
@@ -1055,9 +1055,9 @@ Message: |
784 | We backed up to a gray old man who bore an absurd resemblance to John D.
| ^~ Did you mean to spell `D.` this way?
Suggest:
- - Replace with: “Db”
- Replace with: “Dc”
- - Replace with: “Do”
+ - Replace with: “DA”
+ - Replace with: “DE”
@@ -1246,8 +1246,8 @@ Message: |
| ^~ Did you mean to spell `B.` this way?
Suggest:
- Replace with: “Bu”
- - Replace with: “B”
- Replace with: “Be”
+ - Replace with: “Bf”
@@ -1342,9 +1342,9 @@ Message: |
1122 | Daisy! Dai———”
| ^~~ Did you mean to spell `Dai` this way?
Suggest:
+ - Replace with: “Day”
- Replace with: “Dab”
- Replace with: “Dad”
- - Replace with: “Dais”
@@ -2386,9 +2386,9 @@ Message: |
1858 | farther out on the Island came the Cheadles and the O. R. P. Schraeders, and the
| ^~ Did you mean to spell `R.` this way?
Suggest:
- - Replace with: “R”
- Replace with: “Rd”
- - Replace with: “Re”
+ - Replace with: “R”
+ - Replace with: “RC”
@@ -2397,8 +2397,8 @@ Message: |
1858 | farther out on the Island came the Cheadles and the O. R. P. Schraeders, and the
| ^~ Did you mean to spell `P.` this way?
Suggest:
- - Replace with: “Pp”
- - Replace with: “Pa”
+ - Replace with: “Pt”
+ - Replace with: “P”
- Replace with: “Pd”
@@ -2475,8 +2475,8 @@ Message: |
| ^~ Did you mean to spell `B.` this way?
Suggest:
- Replace with: “Bu”
- - Replace with: “B”
- Replace with: “Be”
+ - Replace with: “Bf”
@@ -2487,8 +2487,8 @@ Message: |
| ^~ Did you mean to spell `A.` this way?
Suggest:
- Replace with: “Ax”
- - Replace with: “A”
- Replace with: “Ab”
+ - Replace with: “Ac”
@@ -2611,8 +2611,8 @@ Message: |
| ^~ Did you mean to spell `G.` this way?
Suggest:
- Replace with: “Gt”
- - Replace with: “Gm”
- Replace with: “Go”
+ - Replace with: “Gr”
@@ -2654,9 +2654,9 @@ Message: |
1871 | afterward strangled his wife. Da Fontano the promoter came there, and Ed Legros
| ^~ Did you mean to spell `Da` this way?
Suggest:
+ - Replace with: “Dab”
- Replace with: “Dad”
- Replace with: “Dam”
- - Replace with: “Day”
@@ -2701,8 +2701,8 @@ Message: |
| ^~ Did you mean to spell `B.` this way?
Suggest:
- Replace with: “Bu”
- - Replace with: “B”
- Replace with: “Be”
+ - Replace with: “Bf”
@@ -2724,7 +2724,7 @@ Message: |
Suggest:
- Replace with: “Db”
- Replace with: “Dc”
- - Replace with: “Dd”
+ - Replace with: “Def”
@@ -2934,7 +2934,7 @@ Message: |
Suggest:
- Replace with: “L”
- Replace with: “Lb”
- - Replace with: “Lg”
+ - Replace with: “Lo”
@@ -3054,8 +3054,8 @@ Message: |
1896 | Fitz-Peters and Mr. P. Jewett, once head of the American Legion, and Miss
| ^~ Did you mean to spell `P.` this way?
Suggest:
- - Replace with: “Pp”
- - Replace with: “Pa”
+ - Replace with: “Pt”
+ - Replace with: “P”
- Replace with: “Pd”
@@ -5447,7 +5447,7 @@ Message: |
Suggest:
- Replace with: “Ta”
- Replace with: “Tb”
- - Replace with: “Ti”
+ - Replace with: “Tn”
@@ -5456,7 +5456,7 @@ Message: |
3874 | while in silence. Then as Doctor T. J. Eckleburg’s faded eyes came into sight
| ^~ Did you mean to spell `J.` this way?
Suggest:
- - Replace with: “Jr”
+ - Replace with: “Jg”
- Replace with: “J”
- Replace with: “JD”
@@ -5516,7 +5516,7 @@ Message: |
Suggest:
- Replace with: “Ta”
- Replace with: “Tb”
- - Replace with: “Ti”
+ - Replace with: “Tn”
@@ -5525,7 +5525,7 @@ Message: |
3948 | behind. Over the ashheaps the giant eyes of Doctor T. J. Eckleburg kept their
| ^~ Did you mean to spell `J.` this way?
Suggest:
- - Replace with: “Jr”
+ - Replace with: “Jg”
- Replace with: “J”
- Replace with: “JD”
@@ -7004,9 +7004,9 @@ Message: |
5122 | ghost of a superior “Hm!”
| ^~ Did you mean to spell `Hm` this way?
Suggest:
- - Replace with: “H”
- Replace with: “H'm”
- - Replace with: “Hem”
+ - Replace with: “Ha”
+ - Replace with: “Ham”
@@ -7072,7 +7072,7 @@ Message: |
Suggest:
- Replace with: “Ta”
- Replace with: “Tb”
- - Replace with: “Ti”
+ - Replace with: “Tn”
@@ -7081,7 +7081,7 @@ Message: |
5156 | of Doctor T. J. Eckleburg, which had just emerged, pale and enormous, from the
| ^~ Did you mean to spell `J.` this way?
Suggest:
- - Replace with: “Jr”
+ - Replace with: “Jg”
- Replace with: “J”
- Replace with: “JD”
@@ -7479,8 +7479,8 @@ Message: |
| ^~ Did you mean to spell `C.` this way?
Suggest:
- Replace with: “Cw”
- - Replace with: “C”
- Replace with: “Cc”
+ - Replace with: “Ch”
@@ -7585,7 +7585,7 @@ Message: |
5412 | “If he’d of lived, he’d of been a great man. A man like James J. Hill. He’d of
| ^~ Did you mean to spell `J.` this way?
Suggest:
- - Replace with: “Jr”
+ - Replace with: “Jg”
- Replace with: “J”
- Replace with: “JD”
@@ -7614,8 +7614,8 @@ Message: |
| ^~ Did you mean to spell `B.` this way?
Suggest:
- Replace with: “Bu”
- - Replace with: “B”
- Replace with: “Be”
+ - Replace with: “Bf”