Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2167158

Browse files
committed
[en] improve rules
1 parent 71e5b13 commit 2167158

File tree

6 files changed

+58
-1
lines changed

6 files changed

+58
-1
lines changed

languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ public List<String> getAdditionalSpellingFileNames() {
199199
private static final Pattern FYI = compile("[Ff]yi");
200200
private static final Pattern DEVOPS = compile("[Dd]evops");
201201
private static final Pattern ALLRIGHT = compile("[Aa]llright");
202+
private static final Pattern ADDON = compile("[Aa]ddons?");
202203
private static final Pattern LANGUAGETOOL = compile("[Ll]anguagetool");
203204
private static final Pattern UNDETERMINISTIC = compile("undeterministic");
204205

@@ -1520,6 +1521,7 @@ protected List<SuggestedReplacement> getOnlySuggestions(String word) {
15201521
if (GITLAB.matcher(word).matches()) return topMatch("GitLab");
15211522
if (BONAFIDE.matcher(word).matches()) return topMatch(word.replaceFirst("onafide", "ona fide"));
15221523
if (ALLRIGHT.matcher(word).matches()) return topMatch(word.replaceFirst("llright", "lright"));
1524+
if (ADDON.matcher(word).matches()) return topMatch(word.replaceFirst("ddon", "dd-on"));
15231525
if (WHEREEVER.matcher(word).matches()) return topMatch(word.replaceFirst("hereever", "herever"));
15241526
if (WHATSAPP.matcher(word).matches()) return topMatch("WhatsApp");
15251527
if (JETLAGGED.matcher(word).matches()) return topMatch("jet-lagged");

languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/added.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,5 @@ Chornobyl Chornobyl NNP
8585
Roopesh Roopesh NNP
8686
Piotrek Piotrek NNP
8787
HCLTech HCLTech NNP
88+
Mausolus Mausolus NNP
8889
star-spangled star-spangled JJ

languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/hunspell/ignore.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10367,6 +10367,13 @@ Proxmox
1036710367
Roopesh
1036810368
Piotrek
1036910369
Isfahan
10370+
Mausolus
10371+
inflight
10372+
PY
10373+
crit
10374+
crits
10375+
shareout
10376+
shareouts
1037010377
Synopsys
1037110378
RFP
1037210379
RFPs

languagetool-language-modules/en/src/main/resources/org/languagetool/resource/en/hunspell/spelling.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ matryoshka
266266
matryoshkas
267267
popup
268268
popups
269+
share-out
270+
share-outs
269271
rasorite
270272
rasorites
271273
vernissage

languagetool-language-modules/en/src/main/resources/org/languagetool/rules/en/diacritics.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,4 +1374,5 @@ Qarabag=Qarabağ
13741374
Qarabag Agdam=Qarabağ Ağdam
13751375
Benito Juarez=Benito Juárez
13761376
Adam Hlozek=Adam Hložek
1377+
Peter Magyar=Péter Magyar
13771378
Tadej Pogacar=Tadej Pogačar

languagetool-language-modules/en/src/main/resources/org/languagetool/rules/en/grammar.xml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ USA
8181
<!ENTITY nouns_with_off "(log|show|spin|take|sign|write|pay|run|hand|drop|kick|lay|shut|cut|rub|stand|trade|send|brush|turn|lift|rip|set|scratch|sell)">
8282
<!ENTITY nouns_with_down "(shoot|lock|back|slow|drop|drift|break|push|shut|crack|count|let|write|take|step|drill|mark|touch|draw|bring|run|stare|lay)">
8383
<!ENTITY nouns_with_over "(turn|hand|roll|fail|sleep|voice|take|pop|do|make|cross|hold|spill|stop|pull)">
84-
<!ENTITY nouns_with_out "(blow|brown|call|cop|carve|hold|miss|spin|hand|eat|fall|cut|brush|slip|black|opt|stand|pull|hide|bail|pay|freak|hang|shout|cash|print|try|burn|sign|log|break|time|look|roll|work|check|lay|take|read|knock|wash|watch|carry|turn|drop|make|cheap|phase)">
84+
<!ENTITY nouns_with_out "(blow|brown|call|cop|carve|hold|miss|spin|hand|eat|fall|cut|brush|slip|black|opt|stand|pull|hide|bail|pay|freak|hang|shout|cash|print|try|burn|sign|log|break|time|look|roll|work|check|lay|take|read|knock|wash|watch|carry|turn|drop|make|cheap|phase|share)">
8585
<!ENTITY nouns_with_back "(play|blow|push|pull|charge|stand|pay|kick|roll|lift|call|come|feed|fall|buy|set|throw|flash|draw|fight)">
8686
<!ENTITY nouns_with_away "(run|get|take|give|cast|fly|break|walk|work|throw)">
8787
<!ENTITY nouns_with_in "(run|get|take|give|add|drop|fill|opt|check|sleep|plug|trade|call|drive|walk|pull|write|log|break|step|sign)">
@@ -223,6 +223,10 @@ USA
223223
<token>squash</token>
224224
<token inflected="yes">merge</token>
225225
</antipattern>
226+
<antipattern>
227+
<token>raw</token>
228+
<token inflected="yes">dog</token>
229+
</antipattern>
226230
<antipattern><!-- https://www.lexico.com/definition/soft_soap -->
227231
<token>soft</token>
228232
<token inflected="yes" regexp="yes">soap|sell|serve|block|reset|lock</token>
@@ -32372,6 +32376,46 @@ USA
3237232376
<token skip="-1">thanks</token>
3237332377
<token regexp="yes">that|who</token>
3237432378
</antipattern>
32379+
<antipattern>
32380+
<token postag="VB[DZ]" postag_regexp="yes" />
32381+
<token postag="RB" min="0" />
32382+
<token regexp="yes">among(st)?</token>
32383+
<token chunk_re="B-NP.*" />
32384+
<token chunk_re="I-NP.*" min="0" />
32385+
<token chunk="E-NP-plural" />
32386+
<token regexp="yes">that|who</token>
32387+
<token postag="VBZ" />
32388+
<example>The United States is among the foreign countries that has collaborated with the center in conducting capacity building programmes.</example>
32389+
</antipattern>
32390+
<antipattern>
32391+
<token chunk="E-NP-singular" />
32392+
<token regexp="yes">which|that|who</token>
32393+
<token postag="RB" min="0" />
32394+
<token postag="VB[DZ]" postag_regexp="yes" />
32395+
<token postag="RB" min="0" />
32396+
<token postag="IN" />
32397+
<token chunk_re="B-NP-plural" min="0" />
32398+
<token chunk_re="I-NP-plural" min="0" />
32399+
<token chunk_re="E-NP-plural" />
32400+
<token regexp="yes">that|who</token>
32401+
<token postag="VBZ" />
32402+
<example>The customer has prepared a detailed document which is in the bug attachments that shows the step-by-step process used to demonstrate the issue.</example>
32403+
</antipattern>
32404+
<antipattern>
32405+
<token chunk="E-NP-singular" />
32406+
<token regexp="yes">which|that|who</token>
32407+
<token postag="RB" min="0" />
32408+
<token inflected="yes" regexp="yes">have|will|can|cannot|must|should|be|get</token>
32409+
<token postag="RB" min="0" />
32410+
<token postag="VB.*" postag_regexp="yes" />
32411+
<token postag="RB" min="0" />
32412+
<token postag="IN" />
32413+
<token chunk_re="B-NP-plural" min="0" />
32414+
<token chunk_re="I-NP-plural" min="0" />
32415+
<token chunk_re="E-NP-plural" />
32416+
<token regexp="yes">that|who</token>
32417+
<token postag="VBZ" />
32418+
</antipattern>
3237532419
<pattern>
3237632420
<token><exception postag="CD" /></token>
3237732421
<token regexp="yes" postag="NNS" chunk="E-NP-plural">.+s

0 commit comments

Comments
 (0)