From 78a1bfc1f948548dfc150afe9dd4811dddfb7b91 Mon Sep 17 00:00:00 2001 From: Christopher Blum Date: Fri, 22 Dec 2023 19:08:45 +0100 Subject: [PATCH] [en] improved rules --- .../languagetool/rules/en/AbstractEnglishSpellerRule.java | 3 ++- .../main/resources/org/languagetool/resource/en/added.txt | 2 ++ .../resources/org/languagetool/resource/en/en-US-GB.txt | 3 ++- .../org/languagetool/resource/en/hunspell/ignore.txt | 8 ++++++++ .../org/languagetool/resource/en/hunspell/spelling.txt | 6 ++++++ .../resources/org/languagetool/resource/en/multiwords.txt | 2 ++ .../resources/org/languagetool/resource/en/removed.txt | 3 ++- 7 files changed, 24 insertions(+), 3 deletions(-) diff --git a/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java b/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java index 43a511cb9b72..63a5835aabc4 100644 --- a/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java +++ b/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java @@ -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"); @@ -1122,7 +1123,6 @@ protected static Map> 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 @@ -1474,6 +1474,7 @@ protected List 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 l = new ArrayList<>(); l.add(new SuggestedReplacement("TV")); diff --git a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/added.txt b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/added.txt index 56ddeeb4b68f..f449948ac307 100644 --- a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/added.txt +++ b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/added.txt @@ -35701,3 +35701,5 @@ handshook handshake VBN handshaking handshake VBG handshakes handshake VBZ IMAGO IMAGO NNP +Vltava Vltava NNP +Bishopsgate Bishopsgate NNP \ No newline at end of file diff --git a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/en-US-GB.txt b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/en-US-GB.txt index 2294bbeb6f4a..342bec78306c 100644 --- a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/en-US-GB.txt +++ b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/en-US-GB.txt @@ -4803,4 +4803,5 @@ quettaliters;quettalitres quectoliter;quectolitre quectoliters;quectolitres laser-focused;laser-focussed -colorings;colourings \ No newline at end of file +colorings;colourings +brokerage;broking \ No newline at end of file diff --git a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/hunspell/ignore.txt b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/hunspell/ignore.txt index 71a21d9508c0..28b866caeeb7 100644 --- a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/hunspell/ignore.txt +++ b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/hunspell/ignore.txt @@ -10220,3 +10220,11 @@ Teton Yoan Omelas acinous +Wardley +tael +taels +catchup +catchups +RxJS +scikit-learn +SageMaker \ No newline at end of file diff --git a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/hunspell/spelling.txt b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/hunspell/spelling.txt index 8208ac96fe8a..a19911d76fba 100644 --- a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/hunspell/spelling.txt +++ b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/hunspell/spelling.txt @@ -38533,3 +38533,9 @@ falsework formwork Rosencrantz Guildenstern +handshook +handshaking +Vltava +managership +managerships +Bishopsgate \ No newline at end of file diff --git a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/multiwords.txt b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/multiwords.txt index db24f1b9eaa9..510d86cd9f71 100644 --- a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/multiwords.txt +++ b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/multiwords.txt @@ -7805,3 +7805,5 @@ Cabernet Sauvignons NNPS Dungeness crab NN Dungeness crabs NNS Roch Kubatko NNP +feng shui NN:U +Gracechurch Street NNP \ No newline at end of file diff --git a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/removed.txt b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/removed.txt index cad4a19f8ae6..c0470c55f651 100644 --- a/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/removed.txt +++ b/languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/removed.txt @@ -897,4 +897,5 @@ licencing licence VBG licenced licence VBD licenced licence VBN kWh kWh NNP -town town JJ \ No newline at end of file +town town JJ +dashed dashed RB \ No newline at end of file