Skip to content

Commit

Permalink
[en] improve rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tiff committed Apr 12, 2024
1 parent ca61ace commit 32c3d58
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public List<String> getAdditionalSpellingFileNames() {
private static final Pattern GITLAB = compile("[Gg]itlab");
private static final Pattern BONAFIDE = compile("[Bb]onafide");
private static final Pattern WHEREEVER = compile("[Ww]hereever");
private static final Pattern WHATSAPP = compile("[Ww]hatsapp");
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 @@ -1519,6 +1520,7 @@ protected List<SuggestedReplacement> getOnlySuggestions(String word) {
if (BONAFIDE.matcher(word).matches()) return topMatch(word.replaceFirst("onafide", "ona fide"));
if (ALLRIGHT.matcher(word).matches()) return topMatch(word.replaceFirst("llright", "lright"));
if (WHEREEVER.matcher(word).matches()) return topMatch(word.replaceFirst("hereever", "herever"));
if (WHATSAPP.matcher(word).matches()) return topMatch("WhatsApp");
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 @@ -10360,5 +10360,7 @@ add-ins
MRs
Gboard
Clintonville
Cityhopper
hells
RFP
RFPs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ picolinate
picolinates
pospolite
pospolites
neuroeconomic
neuroeconomics
sanitorium
sanitoriums
e-visa
e-visas
matryoshka
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7946,4 +7946,5 @@ Académie des Sciences Morales et Politiques NNP
Académie des Beaux-Arts NNP
Académie des Inscriptions et Belles Lettres NNP
Académie Française NNP
Pinot noir _multiword_
Pinot noir _multiword_
Folie à deux _multiword_
Original file line number Diff line number Diff line change
Expand Up @@ -130583,6 +130583,36 @@ The accident victim died from her injuries.
<token>not</token>
<token postag="VBG" />
</antipattern>
<antipattern>
<token>by</token>
<token regexp="yes">accident|reason</token>
</antipattern>
<antipattern>
<token regexp="yes">the|a</token>
<token>will</token>
<token>by</token>
</antipattern>
<antipattern>
<token inflected="yes">be</token>
<token>please</token>
<token>by</token>
</antipattern>
<antipattern>
<token>little</token>
<token>by</token>
<token>little</token>
</antipattern>
<antipattern>
<token>by</token>
<token regexp="yes">years|months|weeks|days</token>
<token regexp="yes">end|start</token>
</antipattern>
<antipattern>
<token>by</token>
<token regexp="yes">year|month|week|day</token>
<token min="0">'s</token>
<token regexp="yes">end|start</token>
</antipattern>
<rule>
<antipattern>
<token />
Expand Down Expand Up @@ -130743,7 +130773,12 @@ The accident victim died from her injuries.
<token regexp="yes">you|it</token>
</antipattern>
<antipattern>
<token chunk="I-VP" />
<token>pass</token>
<token regexp="yes">you|it</token>
<token>by</token>
</antipattern>
<antipattern>
<token chunk_re=".-VP" />
<token regexp="yes">you|it</token>
</antipattern>
<antipattern>
Expand Down

0 comments on commit 32c3d58

Please sign in to comment.