Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cb changes 20250131 #11218

Merged
merged 11 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ private static boolean isLeftBracket(String str) {
return false;
}
char c = str.charAt(0);
return c == '(' || c == '[' || c == '{';
return c == '(';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Breaking change: Bracket handling restricted to parentheses only.

The changes in isLeftBracket and isRightBracket methods now only handle parentheses (), removing support for square brackets [] and curly braces {}. This is a breaking change that conflicts with:

  1. The class documentation which states: "A rule that matches periods, commas and closing parenthesis preceded by whitespace and opening parenthesis followed by whitespace."
  2. The existing test cases mentioned in the AI summary that check for various bracket types.

Consider one of these solutions:

  1. Revert the changes to maintain backward compatibility:
-    return c == '(';
+    return c == '(' || c == '[' || c == '{';
-    return c == ')';
+    return c == ')' || c == ']' || c == '}';
  1. If the intent is to restrict bracket handling:
    • Update the class documentation to clarify the scope
    • Update the test cases to remove bracket type checks
    • Consider creating a new rule for handling other bracket types
    • Add a migration guide for users

Also applies to: 244-244

}

private static boolean isRightBracket(String str) {
if (isEmpty(str)) {
return false;
}
char c = str.charAt(0);
return c == ')' || c == ']' || c == '}';
return c == ')';
}

private static boolean containsDigit(String str) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27130,6 +27130,19 @@ Gary Gensler
Nani Roma
Karin Keller-Sutter
Keller-Sutter
Kumbh Mela
Boom Supersonic
Anders Holch Povlsen
Holch Povlsen
Arabella Rose Kushner
Arabella Kushner
Arabella Rose
Caroline Kennedy
American Water Works
Reagan National Airport
Ronald Reagan National Airport
Ronald Reagan Washington National Airport
CoreWeave
Banca Monte dei Paschi
Monte dei Paschi
Banca Monte dei Paschi di Siena
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ public void testRule() throws IOException {
assertMatches(",is a test sentence.", 2);
assertMatches("This ( foo bar) is a test!.", 1);
assertMatches("This (foo bar ) is a test!.", 1);
assertMatches("This [ foo bar) is a test!.", 1);
assertMatches("This (foo bar ] is a test!.", 1);
assertMatches("This { foo bar) is a test!.", 1);
assertMatches("This (foo bar } is a test!.", 1);
assertMatches("This is a sentence with an orphaned full stop .", 1);
assertMatches("This is a test with a OOo footnote\u0002, which is denoted by 0x2 in the text.", 0);
assertMatches("A sentence ' with ' ten \" incorrect \" examples of ’ using ’ quotation “ marks ” at « once » in it.", 10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243934,6 +243934,7 @@ Koinonia/S
McGregor/S
Persinger/S
Salingen/S
Nietzard/S #name
Tonkunas
Tootie/S
Wenzinger/S
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66002,6 +66002,38 @@ Rechtsprechungsdienst/S
Rechtsprechungsdienste/SN
Pegidist
Pegidisten
drachenmäßig/A
Podcastranking/S
Podcastmoderatorin
Podcastmoderatorinnen
Podcastmoderator/S
Podcastmoderatoren
Podcastteilnehmer/NS
Podcastteilnehmerin
Podcastteilnehmerinnen
Podcastinterview/S
Podcasthörer/SN
Podcasthörerin
Podcasthörerinnen
Podcastaufnahme/N
Podcastaufzeichnung
Podcastaufzeichnungen
geschlechterparitätisch/A
wahltaktisch/A
weg_kontrollieren
rum_simsen
weg_simsen
herum_simsen
raus_simsen
heraus_simsen
hinaus_simsen
rein_simsen
herein_simsen
hinein_simsen
kapitalismuskritisch/A
zurück_orientieren
Zustrombegrenzungsgesetz
Zustrombegrenzungsgesetze/SN
durch_analysieren
ultraexklusiv/A
nasenspraysüchtig/A
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3212,6 +3212,13 @@ Lee Strasberg/S
Second Vocals
Background Vocals
Scott Dodelson/S
Susanne Daubner/S
Constantin Schreiber/S
Dunja Hayali/S
Marietta Slomka/S
Linda Zervakis
Jan Hofer/S
Katy Perry/S
John Erick Dowdle/S
Michael Persinger/S
Saulius Tonkunas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2584,6 +2584,15 @@ To ignore a remote rule match, set the <marker> so that it exactly covers the te
</pattern>
<example correction="">Verbindung zu <marker>Dunkler</marker> Materie.</example>
</rule>
<rule>
<pattern case_sensitive="yes">
<marker>
<token>Die</token>
</marker>
<token>Linke</token>
</pattern>
<example>Ich glaube, <marker>Die</marker> Linke hat keine Chance bei der nächsten Wahl.</example>
</example>
</rulegroup>

<rulegroup id="AI_DE_GGEC_REPLACEMENT_NOUN_FORM" name="">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17181,4 +17181,15 @@ Incorrectly touched. <example type="untouched">Incorrect grammar. Those present
<disambig action="ignore_spelling"/>
</rule>
</rulegroup>

<rule id="I_O_NO_PRP" name="I in I/O is no PRP">
<pattern>
<marker>
<token case_sensitive="yes">I</token>
</marker>
<token>/</token>
<token>O</token>
</pattern>
<disambig action="remove" postag="PRP.*"/>
</rule>
</rules>
Original file line number Diff line number Diff line change
Expand Up @@ -11004,6 +11004,7 @@ Amyntas
Amastan
Noveroske
phygital
LoRA
ln
inerts
Kanto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,21 @@ myofibroblastic
transdifferentiation
layover
layovers
four-limbed
strong-limbed
limbed
isocitrate
isocitrates
decarboxylation
alphaketoglutarate
alphaketoglutarates
stylobate
stylobates
uroepithelium
uroepithelia
uroepithelial
Perizzite
Perizzites
chancellorship
tympanic
tympanum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106872,11 +106872,15 @@ The accident victim died from her injuries.
<example>It's sure going to be rough coming back to 100.</example><!-- used as adverb -->
</rule>
<rule id="SPEND_IT_FOR" name="Collocation: spend it for/on">
<!-- Created by Nicholas Walker (Bokomaru), 2018-05-16 -->
<antipattern><!-- https://www.lexico.com/definition/for_good -->
<token>for</token>
<token regexp="yes">good|sure|(him|her|them|it)(self|selves)?|myself|yourself|me|you</token>
</antipattern>
<!-- Created by Nicholas Walker (Bokomaru), 2018-05-16 -->
<antipattern>
<token skip="4">for</token>
<token>sake</token>
</antipattern>
<pattern>
<token inflected='yes' chunk_re=".-VP">spend</token>
<token>it</token>
Expand Down