Skip to content

Commit

Permalink
[en] improved rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tiff committed Dec 22, 2023
1 parent fd377f7 commit 78a1bfc
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public abstract class AbstractEnglishSpellerRule extends MorfologikSpellerRule {
private static final Pattern JIST = compile("[Jj]ist");
private static final Pattern ADHOC = compile("[Ad]hoc");
private static final Pattern DEACTIVE = compile("[De]eactive");
private static final Pattern HONGKONG = compile("Hong Kong");
private static final Pattern HUBSPOT = compile("[Hh]ubspot");
private static final Pattern URL = compile("[Uu]rl");
private static final Pattern TV = compile("tv");
Expand Down Expand Up @@ -1122,7 +1123,6 @@ protected static Map<String, List<String>> getTopSuggestions() {
s.put("grandmom", Arrays.asList("grandma", "grandmother"));
s.put("Grandmum", Arrays.asList("Grandma", "Grandmother"));
s.put("Grandmom", Arrays.asList("Grandma", "Grandmother"));
s.put("Hongkong", Arrays.asList("Hong Kong"));
s.put("enlighting", Arrays.asList("enlightening"));
s.put("Enlighting", Arrays.asList("Enlightening"));
// For non-US English
Expand Down Expand Up @@ -1474,6 +1474,7 @@ protected List<SuggestedReplacement> getOnlySuggestions(String word) {
if (HTTP.matcher(word).matches()) return topMatch("HTTP");
if (HTTPS.matcher(word).matches()) return topMatch("HTTPS");
if (FYI.matcher(word).matches()) return topMatch("FYI");
if (HONGKONG.matcher(word).matches()) return topMatch("Hong Kong");
if (TV.matcher(word).matches()) {
List<SuggestedReplacement> l = new ArrayList<>();
l.add(new SuggestedReplacement("TV"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35701,3 +35701,5 @@ handshook handshake VBN
handshaking handshake VBG
handshakes handshake VBZ
IMAGO IMAGO NNP
Vltava Vltava NNP
Bishopsgate Bishopsgate NNP
Original file line number Diff line number Diff line change
Expand Up @@ -4803,4 +4803,5 @@ quettaliters;quettalitres
quectoliter;quectolitre
quectoliters;quectolitres
laser-focused;laser-focussed
colorings;colourings
colorings;colourings
brokerage;broking
Original file line number Diff line number Diff line change
Expand Up @@ -10220,3 +10220,11 @@ Teton
Yoan
Omelas
acinous
Wardley
tael
taels
catchup
catchups
RxJS
scikit-learn
SageMaker
Original file line number Diff line number Diff line change
Expand Up @@ -38533,3 +38533,9 @@ falsework
formwork
Rosencrantz
Guildenstern
handshook
handshaking
Vltava
managership
managerships
Bishopsgate
Original file line number Diff line number Diff line change
Expand Up @@ -7805,3 +7805,5 @@ Cabernet Sauvignons NNPS
Dungeness crab NN
Dungeness crabs NNS
Roch Kubatko NNP
feng shui NN:U
Gracechurch Street NNP
Original file line number Diff line number Diff line change
Expand Up @@ -897,4 +897,5 @@ licencing licence VBG
licenced licence VBD
licenced licence VBN
kWh kWh NNP
town town JJ
town town JJ
dashed dashed RB

0 comments on commit 78a1bfc

Please sign in to comment.