-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[de] swiss german salutation rule #10805
[de] swiss german salutation rule #10805
Conversation
private final String id; | ||
|
||
// Predefined category ids | ||
public static final CategoryId PUNCTUATION = new CategoryId("PUNCTUATION"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This already exists in class CategoryIds
@@ -91,14 +94,17 @@ public List<Rule> getRelevantRemoteRules(ResourceBundle messageBundle, List<Remo | |||
|
|||
@Override | |||
public List<RuleMatch> filterRuleMatches(List<RuleMatch> ruleMatches, AnnotatedText text, Set<String> enabledRules) { | |||
//First, use the filter in German.java | |||
// First, use the filter in German.java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't re-format the code in the same commit that makes the actual change
@@ -0,0 +1,75 @@ | |||
package org.languagetool.rules.de; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the license header (see other .java files)
+ ")\\b,\\n" | ||
); | ||
|
||
private static final Category PUNCTUATION_CATEGORY = new Category(CategoryId.PUNCTUATION, "Punctuation"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
|
||
public SwissGermanSalutationRule(ResourceBundle messages) { | ||
super(messages); | ||
setCategory(PUNCTUATION_CATEGORY); // Set the PUNCTUATION category |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment isn't needed here, as the code shows what's happening
|
||
private static final Category PUNCTUATION_CATEGORY = new Category(CategoryId.PUNCTUATION, "Punctuation"); | ||
|
||
public SwissGermanSalutationRule(ResourceBundle messages) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test case for this class?
You can call |
A rule that deletes the comma after salutation in Swiss German (as recommended) Is there a way to implement this as style (because the German variant is not super uncommon)?