Skip to content

Commit

Permalink
[en] improve rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tiff committed Jul 23, 2024
1 parent 9c2191a commit 3f65f65
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public RuleMatch[] match(List<AnalyzedSentence> sentences) throws IOException {
shortMsg = "";
}
if (!shortMsg.isEmpty()) {
String msg = shortMsg + " " + messages.getString("desc_repetition_beginning_thesaurus");
String msg = messages.getString("desc_repetition_beginning_thesaurus");
int startPos = analyzedToken.getStartPos();
int endPos = startPos + token.length();
RuleMatch ruleMatch = new RuleMatch(this, sentence, pos + startPos, pos + endPos, msg, shortMsg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9048,6 +9048,8 @@ gang-bangers?
trench-coat?
trench-coats?
sub-par*
nail-biter*
nail-biters*
royalty-free*
Non-Hodgkin*
get-togethers*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10922,6 +10922,8 @@ Rodri
Joselu
Beryl
Musiala
topbar
topbars
Miraidon
Dipplin
Ogerpon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,15 @@ supermajorities
MacBooks
inanimacy
Flesch-Kincaid
themeable
tameable
esteemable
chromable
creamable
unaccrued
nail-biter
nail-biters
nail-biting
shoutout
shout-out
shoutouts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ remodeler
remodelers
nanofiber
nanofibers
quantizers
quantizers
re-energize
re-energized
re-energizes
re-energizing
Original file line number Diff line number Diff line change
Expand Up @@ -8004,5 +8004,6 @@ Raging Bolt NNP
Cap de Formentor NNP
hawk tuah UH
Morgan Wallen NNP
Khan Yunes NNP
Iron Boulder NNP
Iron Crown NNP
Original file line number Diff line number Diff line change
Expand Up @@ -80430,6 +80430,13 @@ USA
<token>to</token>
<token postag="VB" />
</antipattern>
<antipattern>
<token chunk_re="E-NP.*" />
<token postag="PRP_S.*" postag_regexp="yes" />
<token inflected="yes" regexp="yes">require|allow</token>
<token>to</token>
<example>He has all the knowledge/authority it requires to make this a successful product.</example>
</antipattern>
<pattern>
<token inflected="yes" regexp="yes" postag_regexp="yes" postag="VB.?" chunk_re=".-VP">allow|advise|authorize|cause|convince|encourage|force|hire|inform|instruct|invite|order|persuade|remind|require|teach|tell|train|urge
<exception postag="VB[GN]" postag_regexp="yes"/>
Expand Down Expand Up @@ -85994,6 +86001,39 @@ USA
<token>then</token><!-- confusion of "than" -->
<token>last</token>
</antipattern>
<antipattern>
<token skip="2">since</token>
<token>last</token>
</antipattern>
<antipattern>
<token postag="SENT_START" skip="3" />
<token>last</token>
<example>Last month, last week?</example>
</antipattern>
<antipattern>
<token postag="SENT_START" skip="-1">
<exception postag="VB.*" postag_regexp="yes" scope="next" />
</token>
<token>last</token>
</antipattern>
<antipattern>
<token skip="3" regexp="yes">thanks?</token>
<token skip="10">for</token>
<token>last</token>
<example>But first, thank you very much again for meeting last week.</example>
</antipattern>
<antipattern>
<token>is</token>
<token regexp="yes" skip="-1">down|up</token>
<token>last</token>
<example>That is down from a high of 47 early last year.</example>
</antipattern>
<antipattern>
<token regexp="yes">down|up</token>
<token skip="-1">from</token>
<token>last</token>
<example>Oprah Winfrey, the Queen of Media, is mightier than ever, and holds the No. 3 spot, up from No. 15 last year.</example>
</antipattern>
<pattern>
<marker>
<token>last
Expand Down

0 comments on commit 3f65f65

Please sign in to comment.